aboutsummaryrefslogtreecommitdiff
path: root/src/rpc
diff options
context:
space:
mode:
authorMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-10-12 11:11:48 +0200
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2023-10-12 11:14:32 +0200
commitfaa90f6e7b6b8c531e1ae142a5c2f568b48502a9 (patch)
tree2464dfbc7e96c4c5b223f04c5e65aedb1a30ea98 /src/rpc
parent4a5aae9330780c3740e27cc511f7cba1fab745b9 (diff)
downloadbitcoin-faa90f6e7b6b8c531e1ae142a5c2f568b48502a9.tar.xz
refactor: Remove unused nchaintx from SnapshotMetadata constructor
Also, remove wrong nChainTx comment and cast.
Diffstat (limited to 'src/rpc')
-rw-r--r--src/rpc/blockchain.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp
index 31dd8164fe..37a28e414a 100644
--- a/src/rpc/blockchain.cpp
+++ b/src/rpc/blockchain.cpp
@@ -2667,7 +2667,7 @@ UniValue CreateUTXOSnapshot(
tip->nHeight, tip->GetBlockHash().ToString(),
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;
@@ -2694,9 +2694,7 @@ UniValue CreateUTXOSnapshot(
result.pushKV("base_height", tip->nHeight);
result.pushKV("path", path.u8string());
result.pushKV("txoutset_hash", maybe_stats->hashSerialized.ToString());
- // Cast required because univalue doesn't have serialization specified for
- // `unsigned int`, nChainTx's type.
- result.pushKV("nchaintx", uint64_t{tip->nChainTx});
+ result.pushKV("nchaintx", tip->nChainTx);
return result;
}