TARAXA
votes_bundle_rlp.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <libdevcore/Common.h>
4 #include <libdevcore/RLP.h>
5 
6 #include <vector>
7 
8 namespace taraxa {
9 
10 class PbftVote;
11 class PillarVote;
12 
17 constexpr static size_t kPbftVotesBundleRlpSize{5};
18 
25 dev::bytes encodePbftVotesBundleRlp(const std::vector<std::shared_ptr<PbftVote>>& votes);
26 
33 std::vector<std::shared_ptr<PbftVote>> decodePbftVotesBundleRlp(const dev::RLP& votes_bundle_rlp);
34 
35 constexpr static size_t kPillarVotesBundleRlpSize{3};
36 
43 dev::bytes encodePillarVotesBundleRlp(const std::vector<std::shared_ptr<PillarVote>>& votes);
44 
51 std::vector<std::shared_ptr<PillarVote>> decodePillarVotesBundleRlp(const dev::RLP& votes_bundle_rlp);
52 
55 } // namespace taraxa
Definition: RLP.h:56
std::vector< std::shared_ptr< PillarVote > > decodePillarVotesBundleRlp(const dev::RLP &votes_bundle_rlp)
Decodes pillar votes from optimized votes bundle rlp.
Definition: votes_bundle_rlp.cpp:74
dev::bytes encodePbftVotesBundleRlp(const std::vector< std::shared_ptr< PbftVote >> &votes)
Encodes pbft votes into optimized votes bundle rlp.
Definition: votes_bundle_rlp.cpp:8
constexpr static size_t kPillarVotesBundleRlpSize
Definition: votes_bundle_rlp.hpp:35
std::vector< std::shared_ptr< PbftVote > > decodePbftVotesBundleRlp(const dev::RLP &votes_bundle_rlp)
Decodes pbft votes from optimized votes bundle rlp.
Definition: votes_bundle_rlp.cpp:33
constexpr static size_t kPbftVotesBundleRlpSize
Definition: votes_bundle_rlp.hpp:17
dev::bytes encodePillarVotesBundleRlp(const std::vector< std::shared_ptr< PillarVote >> &votes)
Encodes pillar votes into optimized votes bundle rlp.
Definition: votes_bundle_rlp.cpp:53
std::vector<::byte > bytes
Definition: Common.h:46
Definition: config.hpp:8