From 1dbb4a7928d21add80095638cf4df5acf6d49814 Mon Sep 17 00:00:00 2001 From: j-berman Date: Wed, 17 Sep 2025 15:21:46 -0700 Subject: [PATCH] wallet2: warn instead of throw when RingDB doesn't include spend A reorg can end up causing an output's position in the chain to move. Since the wallet doesn't update the RingDB on reorg, it may refer to the output's stale position in the chain. This seems a reasonable solution rather than introducing complex logic to update the stale ring member's value on rerog, since RingDB can be deprecated with FCMP++. --- src/wallet/wallet2.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index aabb06521..2e671824d 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -9300,8 +9300,11 @@ void wallet2::get_outs(std::vector> MINFO("Ignoring output " << out << ", too recent"); } } - THROW_WALLET_EXCEPTION_IF(!own_found, error::wallet_internal_error, - "Known ring does not include the spent output: " + std::to_string(td.m_global_output_index)); + if (!own_found) + { + MWARNING("Known ring does not include the spent output: " + std::to_string(td.m_global_output_index) + + ", there may have been a reorg that moved the spent output's position in the chain"); + } } }