TARAXA
dag_block_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 DagBlock;
11 
16 constexpr static size_t kDAGBlocksBundleRlpSize{3};
17 
24 dev::bytes encodeDAGBlocksBundleRlp(const std::vector<DagBlock>& blocks);
25 
32 std::vector<DagBlock> decodeDAGBlocksBundleRlp(const dev::RLP& blocks_bundle_rlp);
33 
40 std::shared_ptr<DagBlock> decodeDAGBlockBundleRlp(uint64_t index, const dev::RLP& blocks_bundle_rlp);
41 
44 } // namespace taraxa
Definition: RLP.h:56
constexpr static size_t kDAGBlocksBundleRlpSize
Definition: dag_block_bundle_rlp.hpp:16
std::shared_ptr< DagBlock > decodeDAGBlockBundleRlp(uint64_t index, const dev::RLP &blocks_bundle_rlp)
Decodes single dag block from optimized blocks bundle rlp.
Definition: dag_block_bundle_rlp.cpp:84
std::vector< DagBlock > decodeDAGBlocksBundleRlp(const dev::RLP &blocks_bundle_rlp)
Decodes pbft blocks from optimized blocks bundle rlp.
Definition: dag_block_bundle_rlp.cpp:51
dev::bytes encodeDAGBlocksBundleRlp(const std::vector< DagBlock > &blocks)
Encodes pbft blocks into optimized blocks bundle rlp.
Definition: dag_block_bundle_rlp.cpp:10
std::vector<::byte > bytes
Definition: Common.h:46
Definition: config.hpp:8