#include <voting_round.hpp>
Handles execution of one grandpa round. For details 
- See also
 - VotingRoundImpl 
 
Definition at line 18 of file voting_round.hpp.
 
  
  
      
        
          | virtual kagome::consensus::grandpa::VotingRound::~VotingRound  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
virtualdefault   | 
  
 
 
  
  
      
        
          | virtual outcome::result<void> kagome::consensus::grandpa::VotingRound::applyJustification  | 
          ( | 
          const BlockInfo &  | 
          block_info,  | 
         
        
           | 
           | 
          const GrandpaJustification &  | 
          justification  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
pure virtual   | 
  
 
 
  
  
      
        
          | virtual void kagome::consensus::grandpa::VotingRound::attemptToFinalizeRound  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
pure virtual   | 
  
 
 
  
  
      
        
          | virtual BlockInfo kagome::consensus::grandpa::VotingRound::bestFinalCandidate  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
pure virtual   | 
  
 
 
  
  
      
        
          | virtual BlockInfo kagome::consensus::grandpa::VotingRound::bestPrevoteCandidate  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
pure virtual   | 
  
 
 
  
  
      
        
          | virtual bool kagome::consensus::grandpa::VotingRound::completable  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
pure virtual   | 
  
 
 
  
  
      
        
          | virtual void kagome::consensus::grandpa::VotingRound::doCatchUpResponse  | 
          ( | 
          const libp2p::peer::PeerId &  | 
          peer_id | ) | 
           | 
         
       
   | 
  
pure virtual   | 
  
 
 
  
  
      
        
          | virtual void kagome::consensus::grandpa::VotingRound::doCommit  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
pure virtual   | 
  
 
 
  
  
      
        
          | virtual void kagome::consensus::grandpa::VotingRound::doFinalize  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
pure virtual   | 
  
 
 
  
  
      
        
          | virtual void kagome::consensus::grandpa::VotingRound::doPrecommit  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
pure virtual   | 
  
 
 
  
  
      
        
          | virtual void kagome::consensus::grandpa::VotingRound::doPrevote  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
pure virtual   | 
  
 
 
  
  
      
        
          | virtual void kagome::consensus::grandpa::VotingRound::doProposal  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
pure virtual   | 
  
 
During the primary propose we:
- Check if we are the primary for the current round. If not execution of the method is finished
 
- We can send primary propose only if the estimate from last round state is greater than finalized. If we cannot send propose, method is finished
 
- Primary propose is the last rounds estimate.
 
- After all steps above are done we broadcast propose
 
- We store what we have broadcasted in primary_vote_ field 
 
Implemented in kagome::consensus::grandpa::VotingRoundImpl.
 
 
  
  
      
        
          | virtual void kagome::consensus::grandpa::VotingRound::end  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
pure virtual   | 
  
 
 
  
  
      
        
          | virtual const std::optional<BlockInfo>& kagome::consensus::grandpa::VotingRound::finalizedBlock  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
pure virtual   | 
  
 
 
  
  
      
        
          | virtual void kagome::consensus::grandpa::VotingRound::forgetPreviousRound  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
pure virtual   | 
  
 
 
  
  
      
        
          | virtual std::shared_ptr<VotingRound> kagome::consensus::grandpa::VotingRound::getPreviousRound  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
pure virtual   | 
  
 
 
  
  
      
        
          | virtual BlockInfo kagome::consensus::grandpa::VotingRound::lastFinalizedBlock  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
pure virtual   | 
  
 
 
  
  
      
        
          | virtual bool kagome::consensus::grandpa::VotingRound::onPrecommit  | 
          ( | 
          const SignedMessage &  | 
          precommit,  | 
         
        
           | 
           | 
          Propagation  | 
          propagation  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
pure virtual   | 
  
 
 
  
  
      
        
          | virtual bool kagome::consensus::grandpa::VotingRound::onPrevote  | 
          ( | 
          const SignedMessage &  | 
          prevote,  | 
         
        
           | 
           | 
          Propagation  | 
          propagation  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
pure virtual   | 
  
 
 
  
  
      
        
          | virtual void kagome::consensus::grandpa::VotingRound::onProposal  | 
          ( | 
          const SignedMessage &  | 
          primary_propose,  | 
         
        
           | 
           | 
          Propagation  | 
          propagation  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
pure virtual   | 
  
 
 
  
  
      
        
          | virtual void kagome::consensus::grandpa::VotingRound::play  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
pure virtual   | 
  
 
 
  
  
      
        
          | virtual RoundNumber kagome::consensus::grandpa::VotingRound::roundNumber  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
pure virtual   | 
  
 
 
Updates inner state if something (see params) was changed since last call 
- Parameters
 - 
  
    | is_previous_round_changed | is true if previous round is changed  | 
    | is_prevotes_changed | is true if new prevote was accepted  | 
    | is_precommits_changed | is true if new precommits was accepted  | 
  
   
- Returns
 - true if finalized block was changed during update 
 
Implemented in kagome::consensus::grandpa::VotingRoundImpl.
 
 
  
  
      
        
          | virtual VoterSetId kagome::consensus::grandpa::VotingRound::voterSetId  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
pure virtual   | 
  
 
 
The documentation for this class was generated from the following file: