1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
crate::ix!();
//-------------------------------------------[.cpp/bitcoin/src/node/utxo_snapshot.h]
/**
| Metadata describing a serialized version
| of a UTXO set from which an assumeutxo
|
| ChainState can be constructed.
|
*/
#[derive(Default)]
pub struct SnapshotMetadata {
/**
| The hash of the block that reflects the
| tip of the chain for the UTXO set contained
| in this snapshot.
|
*/
base_blockhash: u256,
/**
| The number of coins in the UTXO set
| contained in this snapshot. Used during
| snapshot load to estimate progress of UTXO
| set reconstruction.
*/
coins_count: u64, // default = 0
}
lazy_static!{
/*
SERIALIZE_METHODS(SnapshotMetadata, obj) {
READWRITE(obj.m_base_blockhash, obj.m_coins_count);
}
*/
}
impl SnapshotMetadata {
pub fn new(
base_blockhash: &u256,
coins_count: u64,
nchaintx: u32) -> Self {
todo!();
/*
: base_blockhash(base_blockhash),
: coins_count(coins_count),
*/
}
}