code: func (b *BlockChain) CalcNextBlockVersion() (int32, error) {
  	b.chainLock.Lock()
  	version, err := b.calcNextBlockVersion(b.bestChain.Tip())
  	b.chainLock.Unlock()
  	return version, err
  }
docs: // CalcNextBlockVersion calculates the expected version of the block after the
  // end of the current best chain based on the state of started and locked in
  // rule change deployments.
  //
  // This function is safe for concurrent access.