Versions in this module Expand all Collapse all v0 v0.5.0 Mar 23, 2021 Changes in this version + type DMan struct + func (dm *DMan) AddTxs(txn *badger.Txn, height uint32, txs []interfaces.Transaction, allowReset bool) error + func (dm *DMan) DownloadTxs(txHshLst [][]byte) bool + func (dm *DMan) GetTxs(txn *badger.Txn, height uint32, txLst [][]byte) ([]interfaces.Transaction, [][]byte, error) + func (dm *DMan) Init(database db.DatabaseIface, app appmock.Application, reqBus *request.Client) error + func (dm *DMan) SyncOneBH(txn *badger.Txn, rs *RoundStates) ([]interfaces.Transaction, *objs.BlockHeader, error) + type Engine struct + AdminBus *admin.Handlers + EthPubk []byte + RequestBus *request.Client + func (ce *Engine) AddPendingTx(txn *badger.Txn, d []interfaces.Transaction) error + func (ce *Engine) Init(database db.DatabaseIface, dm *DMan, app appmock.Application, ...) error + func (ce *Engine) Status(status map[string]interface{}) (map[string]interface{}, error) + func (ce *Engine) Sync() (bool, error) + func (ce *Engine) UpdateLocalState() (bool, error) + type Handlers struct + func (mb *Handlers) AddBlockHeader(v *objs.BlockHeader) error + func (mb *Handlers) AddNextHeight(v *objs.NextHeight) error + func (mb *Handlers) AddNextRound(v *objs.NextRound) error + func (mb *Handlers) AddPreCommit(v *objs.PreCommit) error + func (mb *Handlers) AddPreCommitNil(v *objs.PreCommitNil) error + func (mb *Handlers) AddPreVote(v *objs.PreVote) error + func (mb *Handlers) AddPreVoteNil(v *objs.PreVoteNil) error + func (mb *Handlers) AddProposal(v *objs.Proposal) error + func (mb *Handlers) Init(database *db.Database, dm *DMan) error + func (mb *Handlers) PreValidate(v interface{}) error + func (mb *Handlers) Store(v interface{}) error + type MockStore struct + func NewMockStore(mdb *db.MockDatabaseIface) *MockStore + func (ss *MockStore) LoadLocalState(txn *badger.Txn) (*RoundStates, error) + func (ss *MockStore) LoadState(txn *badger.Txn, rcert *objs.RCert) (*RoundStates, error) + type RoundStates struct + OwnState *objs.OwnState + OwnValidatingState *objs.OwnValidatingState + PeerStateMap map[string]*objs.RoundState + ValidatorSet *objs.ValidatorSet + func (r *RoundStates) ChainID() uint32 + func (r *RoundStates) GetCurrentNext() (objs.NextHeightList, objs.NextRoundList, error) + func (r *RoundStates) GetCurrentPreCommits() (objs.PreCommitList, objs.PreCommitNilList, error) + func (r *RoundStates) GetCurrentPreVotes() (objs.PreVoteList, objs.PreVoteNilList, error) + func (r *RoundStates) GetCurrentProposal() *objs.Proposal + func (r *RoundStates) GetCurrentThreshold() int + func (r *RoundStates) GetRoundState(vAddr []byte) *objs.RoundState + func (r *RoundStates) Height() uint32 + func (r *RoundStates) IsCurrentValidator() bool + func (r *RoundStates) IsMe(vAddr []byte) bool + func (r *RoundStates) LocalIsProposer() bool + func (r *RoundStates) LocalPreCommitCurrent() bool + func (r *RoundStates) LocalPreVoteCurrent() bool + func (r *RoundStates) LockedValue() *objs.Proposal + func (r *RoundStates) LockedValueCurrent() bool + func (r *RoundStates) OwnRoundState() *objs.RoundState + func (r *RoundStates) PrevBlock() []byte + func (r *RoundStates) RCert() *objs.RCert + func (r *RoundStates) Round() uint32 + func (r *RoundStates) SetNextHeight(pc *objs.NextHeight) error + func (r *RoundStates) SetNextRound(pc *objs.NextRound) error + func (r *RoundStates) SetPreCommit(pc *objs.PreCommit) error + func (r *RoundStates) SetPreCommitNil(pcn *objs.PreCommitNil) error + func (r *RoundStates) SetPreVote(pv *objs.PreVote) error + func (r *RoundStates) SetPreVoteNil(pvn *objs.PreVoteNil) error + func (r *RoundStates) SetProposal(p *objs.Proposal) error + func (r *RoundStates) ValidValue() *objs.Proposal + func (r *RoundStates) ValidValueCurrent() bool + type SnapShotManager struct + func (ndm *SnapShotManager) Init(database db.DatabaseIface) error + func (ndm *SnapShotManager) Update(txn *badger.Txn, snapShotHeight uint32, syncToHeight uint32, stateRoot []byte, ...) (bool, error) + type Store struct + func (ss *Store) GetDropData(txn *badger.Txn) (isValidator bool, isSync bool, chainID uint32, height uint32, round uint32, ...) + func (ss *Store) GetGossipValues() (*objs.Proposal, *objs.PreVote, *objs.PreVoteNil, *objs.PreCommit, ...) + func (ss *Store) GetMaxBH(txn *badger.Txn) (*objs.BlockHeader, error) + func (ss *Store) GetSyncToBH(txn *badger.Txn) (*objs.BlockHeader, error) + func (ss *Store) Init(database db.DatabaseIface) error + func (ss *Store) IsSync(txn *badger.Txn) (bool, error) + func (ss *Store) LoadLocalState(txn *badger.Txn) (*RoundStates, error) + func (ss *Store) LoadState(txn *badger.Txn, rcert *objs.RCert) (*RoundStates, error) + func (ss *Store) WriteState(rs *RoundStates) error