rpc: Return precise loadtxoutset error messages

The error messages should never happen in normal operation. However, if
they do, they are helpful to return to the user to debug the issue. For
example, to notice a truncated file.
This commit is contained in:
MarcoFalke
2024-07-22 12:21:14 +02:00
parent faa5c86dbf
commit fa530ec543
3 changed files with 36 additions and 47 deletions

View File

@@ -918,7 +918,7 @@ private:
//! To reduce space the serialization format of the snapshot avoids
//! duplication of tx hashes. The code takes advantage of the guarantee by
//! leveldb that keys are lexicographically sorted.
[[nodiscard]] bool PopulateAndValidateSnapshot(
[[nodiscard]] util::Result<void> PopulateAndValidateSnapshot(
Chainstate& snapshot_chainstate,
AutoFile& coins_file,
const node::SnapshotMetadata& metadata);