Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ReplicaStateDB ¶
type ReplicaStateDB struct {
// contains filtered or unexported fields
}
ReplicaStateDB represents a Map that can be accessed either by address or enode
func OpenReplicaStateDB ¶
func OpenReplicaStateDB(path string) (*ReplicaStateDB, error)
OpenReplicaStateDB opens a validator enode database for storing and retrieving infos about validator enodes. If no path is given an in-memory, temporary database is constructed.
func (*ReplicaStateDB) Close ¶
func (rsdb *ReplicaStateDB) Close() error
Close flushes and closes the database files.
func (*ReplicaStateDB) GetReplicaState ¶
func (rsdb *ReplicaStateDB) GetReplicaState() (*replicaStateImpl, error)
func (*ReplicaStateDB) StoreReplicaState ¶
func (rsdb *ReplicaStateDB) StoreReplicaState(rs State) error
StoreReplicaState will store the latest replica state
type ReplicaStateSummary ¶
type State ¶
type State interface { // Functions exposed through to the management RPC. SetStartValidatingBlock(blockNumber *big.Int) error SetStopValidatingBlock(blockNumber *big.Int) error MakeReplica() error MakePrimary() error // Internal functions // Updates replica state given the current block undergoing consensus. NewChainHead(blockNumber *big.Int) // Closes the replica state database. Close() error // view functions IsPrimary() bool IsPrimaryForSeq(blockNumber *big.Int) bool Summary() *ReplicaStateSummary }
Click to show internal directories.
Click to hide internal directories.