Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckSigners ¶ added in v0.3.0
func CheckSigners(local, msg *specqbft.SignedMessage) (*specqbft.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 ...*specqbft.SignedMessage) (*specqbft.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 []byte, from, to *specqbft.SignedMessage) ([]*specqbft.SignedMessage, error) // UpdateDecided updates the given decided message and returns the updated version (could include new signers) UpdateDecided(msg *specqbft.SignedMessage) (*specqbft.SignedMessage, error) // GetDecided returns historical decided messages GetDecided(identifier []byte, heightRange ...specqbft.Height) ([]*specqbft.SignedMessage, error) // GetLastDecided returns height decided messages GetLastDecided(identifier []byte) (*specqbft.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.