mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-02-11 09:42:17 +01:00
assumeutxo: Add network magic ctor param to SnapshotMetadata
This prevents SnapshotMetadata from using any globals implicitly.
This commit is contained in:
@@ -2697,7 +2697,7 @@ UniValue CreateUTXOSnapshot(
|
||||
tip->nHeight, tip->GetBlockHash().ToString(),
|
||||
fs::PathToString(path), fs::PathToString(temppath)));
|
||||
|
||||
SnapshotMetadata metadata{tip->GetBlockHash(), tip->nHeight, maybe_stats->coins_count};
|
||||
SnapshotMetadata metadata{chainstate.m_chainman.GetParams().MessageStart(), tip->GetBlockHash(), tip->nHeight, maybe_stats->coins_count};
|
||||
|
||||
afile << metadata;
|
||||
|
||||
@@ -2809,7 +2809,7 @@ static RPCHelpMan loadtxoutset()
|
||||
"Couldn't open file " + path.utf8string() + " for reading.");
|
||||
}
|
||||
|
||||
SnapshotMetadata metadata;
|
||||
SnapshotMetadata metadata{chainman.GetParams().MessageStart()};
|
||||
try {
|
||||
afile >> metadata;
|
||||
} catch (const std::ios_base::failure& e) {
|
||||
|
||||
Reference in New Issue
Block a user