mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-26 07:13:13 +02:00
refactor: Remove unused nchaintx from SnapshotMetadata constructor
Also, remove wrong nChainTx comment and cast.
This commit is contained in:
@@ -35,8 +35,7 @@ public:
|
|||||||
SnapshotMetadata() { }
|
SnapshotMetadata() { }
|
||||||
SnapshotMetadata(
|
SnapshotMetadata(
|
||||||
const uint256& base_blockhash,
|
const uint256& base_blockhash,
|
||||||
uint64_t coins_count,
|
uint64_t coins_count) :
|
||||||
unsigned int nchaintx) :
|
|
||||||
m_base_blockhash(base_blockhash),
|
m_base_blockhash(base_blockhash),
|
||||||
m_coins_count(coins_count) { }
|
m_coins_count(coins_count) { }
|
||||||
|
|
||||||
|
@@ -2667,7 +2667,7 @@ UniValue CreateUTXOSnapshot(
|
|||||||
tip->nHeight, tip->GetBlockHash().ToString(),
|
tip->nHeight, tip->GetBlockHash().ToString(),
|
||||||
fs::PathToString(path), fs::PathToString(temppath)));
|
fs::PathToString(path), fs::PathToString(temppath)));
|
||||||
|
|
||||||
SnapshotMetadata metadata{tip->GetBlockHash(), maybe_stats->coins_count, tip->nChainTx};
|
SnapshotMetadata metadata{tip->GetBlockHash(), maybe_stats->coins_count};
|
||||||
|
|
||||||
afile << metadata;
|
afile << metadata;
|
||||||
|
|
||||||
@@ -2694,9 +2694,7 @@ UniValue CreateUTXOSnapshot(
|
|||||||
result.pushKV("base_height", tip->nHeight);
|
result.pushKV("base_height", tip->nHeight);
|
||||||
result.pushKV("path", path.u8string());
|
result.pushKV("path", path.u8string());
|
||||||
result.pushKV("txoutset_hash", maybe_stats->hashSerialized.ToString());
|
result.pushKV("txoutset_hash", maybe_stats->hashSerialized.ToString());
|
||||||
// Cast required because univalue doesn't have serialization specified for
|
result.pushKV("nchaintx", tip->nChainTx);
|
||||||
// `unsigned int`, nChainTx's type.
|
|
||||||
result.pushKV("nchaintx", uint64_t{tip->nChainTx});
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user