Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Consensus ¶
type Consensus interface { // Start the consensus service. Start() error // Stop means frees the resources which were allocated for this service. Stop() // Prepare means send transaction to the consensus engine Prepare(tx *types.Transaction) error // Commit recv blocks form Consensus and commit it by consensus Commit() chan *common.CommitEvent // Step send msg to the consensus engine Step(msg []byte) error // Ready means whether consensus has finished electing leader Ready() error // ReportState means block was persisted and report it to the consensus engine ReportState(height uint64, blockHash *types.Hash, txHashList []*events.TxPointer, stateUpdatedCheckpoint *consensus.Checkpoint, needRemoveTxs bool) // Quorum means minimum number of nodes in the cluster that can work Quorum() uint64 // GetLowWatermark will return the low watermark of consensus engine GetLowWatermark() uint64 SubscribeTxEvent(events chan<- []*types.Transaction) event.Subscription SubscribeMockBlockEvent(ch chan<- events.ExecutedEvent) event.Subscription }
Click to show internal directories.
Click to hide internal directories.