code: func (b *BlockChain) warnUnknownVersions(node *blockNode) error {
  	// Nothing to do if already warned.
  	if b.unknownVersionsWarned {
  		return nil
  	}
  
  	// Warn if enough previous blocks have unexpected versions.
  	numUpgraded := uint32(0)
  	for i := uint32(0); i < unknownVerNumToCheck && node != nil; i++ {
  		expectedVersion, err := b.calcNextBlockVersion(node.parent)
  		if err != nil {
  			return err
  		}
  		if expectedVersion > vbLegacyBlockVersion &&
  			(node.version & ^expectedVersion) != 0 {
  
  			numUpgraded++
  		}
  
  		node = node.parent
  	}
  	if numUpgraded > unknownVerWarnNum {
  		log.Warn("Unknown block versions are being mined, so new " +
  			"rules might be in effect.  Are you running the " +
  			"latest version of the software?")
  		b.unknownVersionsWarned = true
  	}
  
  	return nil
  }
docs: // warnUnknownVersions logs a warning if a high enough percentage of the last
  // blocks have unexpected versions.
  //
  // This function MUST be called with the chain state lock held (for writes)