github.com/Tri-stone/burrow@v0.25.0/execution/version.go (about)

     1  package execution
     2  
     3  // Since we have an initial save of our state forest we start one version ahead of the block height, but from then on
     4  // we should track height by this offset.
     5  const VersionOffset = int64(1)
     6  
     7  func VersionAtHeight(height uint64) int64 {
     8  	return int64(height) + VersionOffset
     9  }
    10  
    11  func HeightAtVersion(version int64) uint64 {
    12  	return uint64(version - VersionOffset)
    13  }