Kagome
Polkadot Runtime Engine in C++17
block_data.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_CORE_PRIMITIVES_BLOCK_DATA_HPP
7 #define KAGOME_CORE_PRIMITIVES_BLOCK_DATA_HPP
8 
9 #include <optional>
10 
11 #include "primitives/block.hpp"
13 #include "scale/tie.hpp"
14 
15 namespace kagome::primitives {
16 
21  struct BlockData {
22  SCALE_TIE(6);
23 
25  std::optional<primitives::BlockHeader> header{};
26  std::optional<primitives::BlockBody> body{};
27  std::optional<common::Buffer> receipt{};
28  std::optional<common::Buffer> message_queue{};
29  std::optional<primitives::Justification> justification{};
30  };
31 
32  struct BlockDataFlags {
34  return BlockDataFlags{std::move(hash), true, true, true, true, true};
35  }
36 
38  return BlockDataFlags{std::move(hash), false, false, false, false, false};
39  }
40 
42  bool header{};
43  bool body{};
44  bool receipt{};
45  bool message_queue{};
46  bool justification{};
47  };
48 } // namespace kagome::primitives
49 
50 #endif // KAGOME_CORE_PRIMITIVES_BLOCK_DATA_HPP
std::optional< primitives::BlockHeader > header
Definition: block_data.hpp:25
std::optional< common::Buffer > message_queue
Definition: block_data.hpp:28
static BlockDataFlags allUnset(primitives::BlockHash hash)
Definition: block_data.hpp:37
std::optional< common::Buffer > receipt
Definition: block_data.hpp:27
primitives::BlockHash hash
Definition: block_data.hpp:41
static BlockDataFlags allSet(primitives::BlockHash hash)
Definition: block_data.hpp:33
primitives::BlockHash hash
Definition: block_data.hpp:24
std::optional< primitives::BlockBody > body
Definition: block_data.hpp:26
std::optional< primitives::Justification > justification
Definition: block_data.hpp:29