func (c *thresholdStateCache) Lookup(hash *chainhash.Hash) (ThresholdState, bool) {
	state, ok := c.entries[*hash]
	return state, ok
}
Lookup returns the threshold state associated with the given hash along with
a boolean that indicates whether or not it is valid.
package blockchain
import (
	"fmt"
	"github.com/soteria-dag/soterd/chaincfg/chainhash"
)
type ThresholdState byte
const (
	ThresholdDefined ThresholdState = iota
	ThresholdStarted
	ThresholdLockedIn
	ThresholdActive
	ThresholdFailed
	numThresholdsStates
)
var thresholdStateStrings = map[ThresholdState]string{
	ThresholdDefined:  "ThresholdDefined",
	ThresholdStarted:  "ThresholdStarted",
	ThresholdLockedIn: "ThresholdLockedIn",
	ThresholdActive:   "ThresholdActive",
	ThresholdFailed:   "ThresholdFailed",
}
func (t ThresholdState) String() string {
	if s := thresholdStateStrings[t]; s != "" {
		return s
	}
	return fmt.Sprintf("Unknown ThresholdState (%d)", int(t))
}
type thresholdConditionChecker interface {
	BeginTime() uint64
	EndTime() uint64
	RuleChangeActivationThreshold() uint32
	MinerConfirmationWindow() uint32
	Condition(*blockNode) (bool, error)
}
type thresholdStateCache struct {
	entries map[chainhash.Hash]ThresholdState
}