Versions in this module Expand all Collapse all v1 v1.2.2 Apr 7, 2024 Changes in this version + type ReplicaStateDB struct + func OpenReplicaStateDB(path string) (*ReplicaStateDB, error) + func (rsdb *ReplicaStateDB) Close() error + func (rsdb *ReplicaStateDB) GetReplicaState() (*replicaStateImpl, error) + func (rsdb *ReplicaStateDB) StoreReplicaState(rs State) error + type ReplicaStateSummary struct + IsPrimary bool + StartValidatingBlock *big.Int + State string + StopValidatingBlock *big.Int + type State interface + Close func() error + IsPrimary func() bool + IsPrimaryForSeq func(blockNumber *big.Int) bool + MakePrimary func() error + MakeReplica func() error + NewChainHead func(blockNumber *big.Int) + SetStartValidatingBlock func(blockNumber *big.Int) error + SetStopValidatingBlock func(blockNumber *big.Int) error + Summary func() *ReplicaStateSummary + func NewState(isReplica bool, path string, startFn, stopFn func() error) (State, error)