refactor: Move early loadtxoutset checks into ActiveSnapshot

Also changes the return type of ActiveSnapshot to allow returning the
error message to the user of the loadtxoutset RPC.
This commit is contained in:
Fabian Jahr
2024-06-18 14:24:55 +02:00
parent 9c5cdf07f3
commit 80315c0118
6 changed files with 47 additions and 53 deletions

View File

@@ -54,7 +54,7 @@ FUZZ_TARGET(utxo_snapshot, .init = initialize_chain)
} catch (const std::ios_base::failure&) {
return false;
}
return chainman.ActivateSnapshot(infile, metadata, /*in_memory=*/true);
return !!chainman.ActivateSnapshot(infile, metadata, /*in_memory=*/true);
}};
if (fuzzed_data_provider.ConsumeBool()) {