@@ -9,53 +9,81 @@ namespace beam
9
9
class BlockHeader
10
10
{
11
11
public:
12
- // Version of the block
13
- uint16_t version;
12
+ // Version of the block
13
+ uint16_t version;
14
14
15
- // Height of this block since the genesis block (height 0)
16
- uint64_t height;
15
+ // Height of this block since the genesis block (height 0)
16
+ uint64_t height;
17
17
18
- // Timestamp at which the block was built.
19
- Timestamp timestamp;
18
+ // Timestamp at which the block was built.
19
+ Timestamp timestamp;
20
20
21
- // Hash of the block previous to this in the chain.
22
- Hash previous;
21
+ // Hash of the block previous to this in the chain.
22
+ Hash previous;
23
23
24
- // Merklish root of all the commitments in the TxHashSet
25
- // Hash output_root;
24
+ // Merklish root of all the commitments in the TxHashSet
25
+ // Hash output_root;
26
26
27
- // Merklish root of all range proofs in the TxHashSet
28
- // Hash range_proof_root;
27
+ // Merklish root of all range proofs in the TxHashSet
28
+ // Hash range_proof_root;
29
29
30
- // Merklish root of all transaction kernels in the TxHashSet
31
- // Hash kernel_root;
30
+ // Merklish root of all transaction kernels in the TxHashSet
31
+ // Hash kernel_root;
32
32
33
- // Total accumulated difficulty since genesis block
34
- Difficulty total_difficulty;
33
+ // Total accumulated difficulty since genesis block
34
+ Difficulty total_difficulty;
35
35
36
- // Total accumulated sum of kernel offsets since genesis block.
37
- // We can derive the kernel offset sum for *this* block from
38
- // the total kernel offset of the previous block header.
39
- // total_kernel_offset: BlindingFactor,
36
+ // Total accumulated sum of kernel offsets since genesis block.
37
+ // We can derive the kernel offset sum for *this* block from
38
+ // the total kernel offset of the previous block header.
39
+ // total_kernel_offset: BlindingFactor,
40
40
41
- // Proof of work data.
42
- Proof pow;
41
+ // Proof of work data.
42
+ Proof pow;
43
+
44
+ BlockHeader (){}
45
+
46
+ BlockHeader (const BlockHeader& other) = delete ;
47
+ BlockHeader (BlockHeader&& other) = delete ;
48
+ BlockHeader& operator =(const BlockHeader&) = delete ;
49
+ BlockHeader& operator =(BlockHeader&&) = delete ;
50
+
51
+ template <typename Buffer>
52
+ void serializeTo (Buffer& b)
53
+ {
54
+
55
+ }
43
56
};
44
57
45
58
class Block
46
59
{
47
60
public:
48
- // The header with metadata and commitments to the rest of the data
61
+ // The header with metadata and commitments to the rest of the data
49
62
BlockHeader header;
50
63
51
- // List of transaction inputs
64
+ // List of transaction inputs
52
65
Inputs inputs;
53
66
54
- // List of transaction outputs
67
+ // List of transaction outputs
55
68
Outputs outputs;
56
69
57
- // List of kernels with associated proofs (note these are offset from tx_kernels)
70
+ // List of kernels with associated proofs (note these are offset from tx_kernels)
58
71
Kernels kernels;
72
+
73
+ Block () {}
74
+
75
+ Block (const Block& other) = delete ;
76
+ Block (Block&& other) = delete ;
77
+ Block& operator =(const Block&) = delete ;
78
+ Block& operator =(Block&&) = delete ;
79
+
80
+ template <typename Buffer>
81
+ void serializeTo (Buffer& b)
82
+ {
83
+
84
+ }
59
85
};
60
86
87
+ using BlockUniquePtr = std::unique_ptr<Block>;
88
+
61
89
}
0 commit comments