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