Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckSigners ¶ added in v0.3.0
func CheckSigners(local, msg *message.SignedMessage) (*message.SignedMessage, bool)
CheckSigners will return the decided message with more signers if both are with the same height
func UpdateLastDecided ¶ added in v0.3.0
func UpdateLastDecided(logger *zap.Logger, store qbftstorage.DecidedMsgStore, signedMsgs ...*message.SignedMessage) (*message.SignedMessage, error)
UpdateLastDecided saves last decided message if its height is larger than persisted height
Types ¶
type Decided ¶
type Decided interface { // Sync performs a sync with the other peers in the network Sync(ctx context.Context, identifier message.Identifier, from, to *message.SignedMessage, pip pipelines.SignedMessagePipeline) error // UpdateDecided updates the given decided message and returns the updated version (could include new signers) UpdateDecided(msg *message.SignedMessage) (*message.SignedMessage, error) // GetDecided returns historical decided messages GetDecided(identifier message.Identifier, heightRange ...message.Height) ([]*message.SignedMessage, error) // GetLastDecided returns height decided messages GetLastDecided(identifier message.Identifier) (*message.SignedMessage, error) }
Decided helps to decouple light from full-node mode where the node is saving decided history. in light mode, the node doesn't save history, only last/highest decided messages.
Click to show internal directories.
Click to hide internal directories.