Bitcoin Core
0.21.1
P2P Digital Currency
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
src
node
utxo_snapshot.h
Go to the documentation of this file.
1
// Copyright (c) 2009-2010 Satoshi Nakamoto
2
// Copyright (c) 2009-2019 The Bitcoin Core developers
3
// Distributed under the MIT software license, see the accompanying
4
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
6
#ifndef BITCOIN_NODE_UTXO_SNAPSHOT_H
7
#define BITCOIN_NODE_UTXO_SNAPSHOT_H
8
9
#include <
uint256.h
>
10
#include <
serialize.h
>
11
14
class
SnapshotMetadata
15
{
16
public
:
19
uint256
m_base_blockhash
;
20
23
uint64_t
m_coins_count
= 0;
24
27
unsigned
int
m_nchaintx
= 0;
28
29
SnapshotMetadata
() { }
30
SnapshotMetadata
(
31
const
uint256
& base_blockhash,
32
uint64_t coins_count,
33
unsigned
int
nchaintx) :
34
m_base_blockhash(base_blockhash),
35
m_coins_count(coins_count),
36
m_nchaintx(nchaintx) { }
37
38
SERIALIZE_METHODS
(
SnapshotMetadata
, obj) {
READWRITE
(obj.m_base_blockhash, obj.m_coins_count, obj.m_nchaintx); }
39
};
40
41
#endif // BITCOIN_NODE_UTXO_SNAPSHOT_H
SnapshotMetadata::m_coins_count
uint64_t m_coins_count
The number of coins in the UTXO set contained in this snapshot.
Definition:
utxo_snapshot.h:23
SnapshotMetadata::SnapshotMetadata
SnapshotMetadata()
Definition:
utxo_snapshot.h:29
SnapshotMetadata
Metadata describing a serialized version of a UTXO set from which an assumeutxo CChainState can be co...
Definition:
utxo_snapshot.h:14
serialize.h
SnapshotMetadata::SERIALIZE_METHODS
SERIALIZE_METHODS(SnapshotMetadata, obj)
Definition:
utxo_snapshot.h:38
SnapshotMetadata::SnapshotMetadata
SnapshotMetadata(const uint256 &base_blockhash, uint64_t coins_count, unsigned int nchaintx)
Definition:
utxo_snapshot.h:30
uint256
256-bit opaque blob.
Definition:
uint256.h:124
SnapshotMetadata::m_base_blockhash
uint256 m_base_blockhash
The hash of the block that reflects the tip of the chain for the UTXO set contained in this snapshot...
Definition:
utxo_snapshot.h:19
uint256.h
SnapshotMetadata::m_nchaintx
unsigned int m_nchaintx
Necessary to "fake" the base nChainTx so that we can estimate progress during initial block download ...
Definition:
utxo_snapshot.h:27
READWRITE
#define READWRITE(...)
Definition:
serialize.h:175
Generated on Fri Apr 30 2021 13:53:41 for Bitcoin Core by
1.8.8