From 1010c7e8e453032710519d741d578bbace3586d7 Mon Sep 17 00:00:00 2001 From: Duke Leto Date: Fri, 29 May 2020 23:32:41 -0400 Subject: [PATCH] Throw a logic error instead of asserting when we see weird witness shenanigans --- src/wallet/wallet.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 4422cde7b..3145bbd88 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -2123,7 +2123,12 @@ void CWallet::GetSaplingNoteWitnesses(std::vector notes, if (!rt) { rt = witnesses[i]->root(); } else { - assert(*rt == witnesses[i]->root()); + if(*rt == witnesses[i]->root()) { + // Something is fucky + std::string err = "CWallet::GetSaplingNoteWitnesses: Invalid witness root:" << rt.GetHash(); + throw std::logic_error(err); + } + } } i++;