6 #ifndef KAGOME_CONSENSUS_GRANDPA_VOTINGROUND 7 #define KAGOME_CONSENSUS_GRANDPA_VOTINGROUND 18 class VotingRound :
public std::enable_shared_from_this<VotingRound> {
36 virtual const std::optional<BlockInfo> &
finalizedBlock()
const = 0;
42 virtual void play() = 0;
43 virtual void end() = 0;
125 #endif // KAGOME_CONSENSUS_GRANDPA_VOTINGROUND virtual bool onPrecommit(const SignedMessage &precommit, Propagation propagation)=0
virtual std::shared_ptr< VotingRound > getPreviousRound() const =0
virtual void doFinalize()=0
Collect and save justifications finalizing this round.
virtual bool completable() const =0
virtual BlockInfo lastFinalizedBlock() const =0
virtual BlockInfo bestPrevoteCandidate()=0
virtual void forgetPreviousRound()=0
virtual outcome::result< void > applyJustification(const BlockInfo &block_info, const GrandpaJustification &justification)=0
virtual void onProposal(const SignedMessage &primary_propose, Propagation propagation)=0
virtual ~VotingRound()=default
virtual void update(IsPreviousRoundChanged is_previous_round_changed, IsPrevotesChanged is_prevotes_changed, IsPrecommitsChanged is_precommits_changed)=0
virtual const std::optional< BlockInfo > & finalizedBlock() const =0
virtual bool onPrevote(const SignedMessage &prevote, Propagation propagation)=0
virtual RoundNumber roundNumber() const =0
libp2p::peer::PeerId PeerId
virtual void doProposal()=0
virtual void doPrevote()=0
Calculate prevote and broadcast signed prevote message.
Stores the current state of the round.
virtual VoterSetId voterSetId() const =0
virtual void doPrecommit()=0
Calculate precommit and broadcast signed precommit message.
virtual MovableRoundState state() const =0
virtual void attemptToFinalizeRound()=0
executes algorithm Attempt-To-Finalize-Round
virtual void doCatchUpResponse(const libp2p::peer::PeerId &peer_id)=0
virtual BlockInfo bestFinalCandidate()=0
virtual void doCommit()=0
Broadcast commit message.