Kagome
Polkadot Runtime Engine in C++17
vote_tracker_impl.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_VOTE_TRACKER_IMPL_HPP
7 #define KAGOME_VOTE_TRACKER_IMPL_HPP
8 
10 
12 
13  class VoteTrackerImpl : public VoteTracker {
14  public:
15  PushResult push(const SignedMessage &vote, size_t weight) override;
16 
17  void unpush(const SignedMessage &vote, size_t weight) override;
18 
19  std::vector<VoteVariant> getMessages() const override;
20 
21  size_t getTotalWeight() const override;
22 
23  private:
24  std::map<Id, VoteVariant> messages_;
25  size_t total_weight_ = 0;
26  };
27 
28 } // namespace kagome::consensus::grandpa
29 
30 #endif // KAGOME_VOTE_TRACKER_IMPL_HPP
PushResult push(const SignedMessage &vote, size_t weight) override
std::vector< VoteVariant > getMessages() const override
void unpush(const SignedMessage &vote, size_t weight) override