diff options
author | Fabian Jahr <fjahr@protonmail.com> | 2024-06-18 14:24:55 +0200 |
---|---|---|
committer | Fabian Jahr <fjahr@protonmail.com> | 2024-06-19 22:32:33 +0200 |
commit | 80315c011863d69e7785673283e4c9033fbcd5ac (patch) | |
tree | f316c62c3aa2fe1f9ce27c4d4f1e92d7953efe28 /src/test/util | |
parent | 9c5cdf07f30f816cd134e2cd2dca9c27ef7067a5 (diff) | |
download | bitcoin-80315c011863d69e7785673283e4c9033fbcd5ac.tar.xz |
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.
Diffstat (limited to 'src/test/util')
-rw-r--r-- | src/test/util/chainstate.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/util/chainstate.h b/src/test/util/chainstate.h index 03b44fc894..a4636365ca 100644 --- a/src/test/util/chainstate.h +++ b/src/test/util/chainstate.h @@ -124,11 +124,11 @@ CreateAndActivateUTXOSnapshot( new_active.m_chain.SetTip(*(tip->pprev)); } - bool res = node.chainman->ActivateSnapshot(auto_infile, metadata, in_memory_chainstate); + auto res = node.chainman->ActivateSnapshot(auto_infile, metadata, in_memory_chainstate); // Restore the old tip. new_active.m_chain.SetTip(*tip); - return res; + return !!res; } |