File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,8 @@ pub struct BuiltBlock {
19
19
pub ( crate ) host_fills : Vec < SignedFill > ,
20
20
/// Transactions in the block.
21
21
pub ( crate ) transactions : Vec < TxEnvelope > ,
22
+ /// The block number for the block.
23
+ pub ( crate ) block_number : u64 ,
22
24
23
25
/// The amount of gas used by the block so far
24
26
pub ( crate ) gas_used : u64 ,
@@ -45,12 +47,23 @@ impl BuiltBlock {
45
47
Self {
46
48
host_fills : Vec :: new ( ) ,
47
49
transactions : Vec :: new ( ) ,
50
+ block_number : 0 ,
48
51
gas_used : 0 ,
49
52
raw_encoding : OnceLock :: new ( ) ,
50
53
hash : OnceLock :: new ( ) ,
51
54
}
52
55
}
53
56
57
+ /// Gets the block number for the block.
58
+ pub fn block_number ( & self ) -> u64 {
59
+ self . block_number
60
+ }
61
+
62
+ /// Sets the block number for the block.
63
+ pub fn set_block_number ( & mut self , block_number : u64 ) {
64
+ self . block_number = block_number;
65
+ }
66
+
54
67
/// Get the amount of gas used by the block.
55
68
pub const fn gas_used ( & self ) -> u64 {
56
69
self . gas_used
You can’t perform that action at this time.
0 commit comments