Kagome
Polkadot Runtime Engine in C++17
vote_tracker.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_CORE_CONSENSUS_GRANDPA_VOTE_TRACKER_HPP
7 #define KAGOME_CORE_CONSENSUS_GRANDPA_VOTE_TRACKER_HPP
8 
10 
12 
19  class VoteTracker {
20  public:
22 
23  virtual ~VoteTracker() = default;
24 
34  virtual PushResult push(const SignedMessage &vote, size_t weight) = 0;
35 
41  virtual void unpush(const SignedMessage &vote, size_t weight) = 0;
42 
46  virtual std::vector<VoteVariant> getMessages() const = 0;
47 
51  virtual size_t getTotalWeight() const = 0;
52  };
53 
54 } // namespace kagome::consensus::grandpa
55 
56 #endif // KAGOME_CORE_CONSENSUS_GRANDPA_VOTE_TRACKER_HPP
virtual PushResult push(const SignedMessage &vote, size_t weight)=0
virtual void unpush(const SignedMessage &vote, size_t weight)=0
virtual size_t getTotalWeight() const =0
virtual std::vector< VoteVariant > getMessages() const =0