From 7c434ba03078241e49eaf41927bafd60551a6715 Mon Sep 17 00:00:00 2001 From: Duke Date: Thu, 21 Aug 2025 01:59:20 -0400 Subject: [PATCH] Log calls to GetFilteredNotes and only warn when witness root is actually invalid --- src/wallet/wallet.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index db5cebc9b..da52b8c57 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1846,12 +1846,10 @@ void CWallet::GetSaplingNoteWitnesses(std::vector notes, rt = witnesses[i]->root(); } else { if(*rt == witnesses[i]->root()) { - //fprintf(stderr,"%s: rt=%s\n",__func__,rt.GetHash().ToString().c_str()); - //fprintf(stderr,"%s: witnesses[%d]->root()=%s\n",__func__,i,witnesses[i]->root().GetHash().ToString().c_str()); + } else { // Something is fucky std::string err = string("CWallet::GetSaplingNoteWitnesses: Invalid witness root! rt=") + rt.get().ToString(); err += string("\n!= witness[i]->root()=") + witnesses[i]->root().ToString(); - //throw std::logic_error(err); fprintf(stderr,"%s: IGNORING %s\n", __func__,err.c_str()); } @@ -4880,6 +4878,8 @@ void CWallet::GetFilteredNotes( { LOCK2(cs_main, cs_wallet); + LogPrintf("%s ignoreLocked=%d\n", __func__, ignoreLocked); + for (auto & p : mapWallet) { CWalletTx wtx = p.second;