From a7cd2b375096149f9793a4c5788af237b7b2be68 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Thu, 18 Jun 2020 06:41:26 -0400 Subject: [PATCH] Chill out on the logspam --- src/wallet/wallet.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 4581dae009d..ae845cb21d8 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1719,22 +1719,24 @@ void CWallet::GetSaplingNoteWitnesses(std::vector notes, boost::optional rt; int i = 0; for (SaplingOutPoint note : notes) { - fprintf(stderr,"%s: i=%d\n", __func__,i); + //fprintf(stderr,"%s: i=%d\n", __func__,i); auto noteData = mapWallet[note.hash].mapSaplingNoteData; auto nWitnesses = noteData[note].witnesses.size(); if (mapWallet.count(note.hash) && noteData.count(note) && nWitnesses > 0) { fprintf(stderr,"%s: Found %lu witnesses for note %s\n", __func__, nWitnesses, note.hash.ToString().c_str() ); witnesses[i] = noteData[note].witnesses.front(); if (!rt) { - fprintf(stderr,"%s: Setting witness root\n",__func__); + //fprintf(stderr,"%s: Setting witness root\n",__func__); 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()); // Something is fucky - std::string err = std::string("CWallet::GetSaplingNoteWitnesses: Invalid witness root! rt=") + rt.get().ToString(); - throw std::logic_error(err); + 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()); } } @@ -1744,6 +1746,7 @@ void CWallet::GetSaplingNoteWitnesses(std::vector notes, // All returned witnesses have the same anchor if (rt) { final_anchor = *rt; + //fprintf(stderr,"%s: final_anchor=%s\n", __func__, rt.get().ToString().c_str() ); } }