@@ -7,12 +7,14 @@ use std::{
7
7
use alloy:: primitives:: B256 ;
8
8
use bytes:: Bytes ;
9
9
use committable:: { Commitment , Committable , RawCommitmentBuilder } ;
10
- use minicbor:: { Decode , Encode } ;
10
+ use minicbor:: { CborLen , Decode , Encode } ;
11
11
use multisig:: { Certificate , Committee , CommitteeId , Unchecked , Validated } ;
12
12
use sailfish_types:: { Round , RoundNumber } ;
13
13
14
14
/// A timeboost block number.
15
- #[ derive( Copy , Clone , Debug , Default , PartialEq , Eq , PartialOrd , Ord , Hash , Encode , Decode ) ]
15
+ #[ derive(
16
+ Copy , Clone , Debug , Default , PartialEq , Eq , PartialOrd , Ord , Hash , Encode , Decode , CborLen ,
17
+ ) ]
16
18
#[ cbor( transparent) ]
17
19
pub struct BlockNumber ( u64 ) ;
18
20
@@ -81,7 +83,9 @@ impl fmt::Display for BlockNumber {
81
83
}
82
84
}
83
85
84
- #[ derive( Debug , Default , Clone , Copy , Ord , PartialOrd , PartialEq , Eq , Hash , Encode , Decode ) ]
86
+ #[ derive(
87
+ Debug , Default , Clone , Copy , Ord , PartialOrd , PartialEq , Eq , Hash , Encode , Decode , CborLen ,
88
+ ) ]
85
89
#[ cbor( transparent) ]
86
90
pub struct BlockHash ( #[ cbor( with = "minicbor::bytes" ) ] [ u8 ; 32 ] ) ;
87
91
@@ -113,7 +117,7 @@ impl Committable for BlockHash {
113
117
}
114
118
}
115
119
116
- #[ derive( Debug , Clone , Encode , Decode ) ]
120
+ #[ derive( Debug , Clone , Encode , Decode , CborLen ) ]
117
121
#[ cbor( map) ]
118
122
pub struct Block {
119
123
#[ cbor( n( 0 ) ) ]
@@ -159,7 +163,7 @@ impl Block {
159
163
}
160
164
}
161
165
162
- #[ derive( Debug , Clone , PartialEq , Eq , PartialOrd , Ord , Hash , Encode , Decode ) ]
166
+ #[ derive( Debug , Clone , PartialEq , Eq , PartialOrd , Ord , Hash , Encode , Decode , CborLen ) ]
163
167
#[ cbor( map) ]
164
168
pub struct BlockInfo {
165
169
#[ cbor( n( 0 ) ) ]
@@ -207,7 +211,7 @@ impl Committable for BlockInfo {
207
211
}
208
212
}
209
213
210
- #[ derive( Debug , Encode , Decode ) ]
214
+ #[ derive( Debug , Encode , Decode , CborLen ) ]
211
215
#[ cbor( map) ]
212
216
pub struct CertifiedBlock < S > {
213
217
#[ cbor( n( 0 ) ) ]
0 commit comments