func (c deploymentChecker) Condition(node *blockNode) (bool, error) {
	conditionMask := uint32(1) << c.deployment.BitNumber
	version := uint32(node.version)
	return (version&vbTopMask == vbTopBits) && (version&conditionMask != 0),
		nil
}
Condition returns true when the specific bit defined by the deployment
associated with the checker is set.

This is part of the thresholdConditionChecker interface implementation.
package blockchain
import (
	"math"
	"github.com/soteria-dag/soterd/chaincfg"
)
const (
	vbLegacyBlockVersion = 4
	vbTopBits = 0x20000000
	vbTopMask = 0xe0000000
	vbNumBits = 29
	unknownVerNumToCheck = 100
	unknownVerWarnNum = unknownVerNumToCheck / 2
)
type bitConditionChecker struct {
	bit   uint32
	chain *BlockChain
}
var _ thresholdConditionChecker = bitConditionChecker{}
func (c bitConditionChecker) BeginTime() uint64 {
	return 0
}
func (c bitConditionChecker) EndTime() uint64 {
	return math.MaxUint64
}
func (c bitConditionChecker) RuleChangeActivationThreshold() uint32 {
	return c.chain.chainParams.RuleChangeActivationThreshold
}
func (c bitConditionChecker) MinerConfirmationWindow() uint32 {
	return c.chain.chainParams.MinerConfirmationWindow
}
func (c bitConditionChecker) Condition(node *blockNode) (bool, error) {
	conditionMask := uint32(1) << c.bit
	version := uint32(node.version)
	if version&vbTopMask != vbTopBits {
		return false, nil
	}
	if version&conditionMask == 0 {
		return false, nil
	}
	expectedVersion, err := c.chain.calcNextBlockVersion(node.parent)
	if err != nil {
		return false, err
	}
	return uint32(expectedVersion)&conditionMask == 0, nil
}
type deploymentChecker struct {
	deployment *chaincfg.ConsensusDeployment
	chain      *BlockChain
}
var _ thresholdConditionChecker = deploymentChecker{}
func (c deploymentChecker) BeginTime() uint64 {
	return c.deployment.StartTime
}
func (c deploymentChecker) EndTime() uint64 {
	return c.deployment.ExpireTime
}
func (c deploymentChecker) RuleChangeActivationThreshold() uint32 {
	return c.chain.chainParams.RuleChangeActivationThreshold
}
func (c deploymentChecker) MinerConfirmationWindow() uint32 {
	return c.chain.chainParams.MinerConfirmationWindow
}