File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -516,6 +516,9 @@ pub struct GetTxOutSetInfo {
516
516
///
517
517
/// This was removed in Bitcoin Core v26, and hence will be `None` for v26 and later.
518
518
pub hash_serialized_2 : Option < String > , // FIXME: What sort of hash is this?
519
+ /// The serialized hash (only present if 'hash_serialized_3' hash_type is chosen).
520
+ /// v26 and later only.
521
+ pub hash_serialized_3 : Option < String > ,
519
522
/// The estimated size of the chainstate on disk.
520
523
pub disk_size : u32 ,
521
524
/// The total amount.
Original file line number Diff line number Diff line change @@ -541,6 +541,7 @@ impl GetTxOutSetInfo {
541
541
tx_outs,
542
542
bogo_size,
543
543
hash_serialized_2,
544
+ hash_serialized_3 : None , // v26 and later only.
544
545
disk_size,
545
546
total_amount,
546
547
} )
Original file line number Diff line number Diff line change @@ -37,6 +37,9 @@ pub struct GetTxOutSetInfo {
37
37
pub disk_size : i64 ,
38
38
/// The total amount.
39
39
pub total_amount : f64 ,
40
+ /// The serialized hash (only present if 'hash_serialized_3' hash_type is chosen).
41
+ /// v26 and later only.
42
+ pub hash_serialized_3 : Option < String > ,
40
43
}
41
44
42
45
impl GetTxOutSetInfo {
@@ -49,7 +52,6 @@ impl GetTxOutSetInfo {
49
52
let transactions = crate :: to_u32 ( self . transactions , "transactions" ) ?;
50
53
let tx_outs = crate :: to_u32 ( self . tx_outs , "tx_outs" ) ?;
51
54
let bogo_size = crate :: to_u32 ( self . bogo_size , "bogo_size" ) ?;
52
- let hash_serialized_2 = None ; // Removed in Core v26
53
55
let disk_size = crate :: to_u32 ( self . disk_size , "disk_size" ) ?;
54
56
let total_amount = Amount :: from_btc ( self . total_amount ) . map_err ( E :: TotalAmount ) ?;
55
57
@@ -59,7 +61,8 @@ impl GetTxOutSetInfo {
59
61
transactions,
60
62
tx_outs,
61
63
bogo_size,
62
- hash_serialized_2,
64
+ hash_serialized_2 : None , // v17 to v25 only.
65
+ hash_serialized_3 : self . hash_serialized_3 ,
63
66
disk_size,
64
67
total_amount,
65
68
} )
You can’t perform that action at this time.
0 commit comments