Browse Source

Throw a logic error instead of asserting when we see weird witness shenanigans

pull/117/head
Duke Leto 4 years ago
parent
commit
1010c7e8e4
  1. 7
      src/wallet/wallet.cpp

7
src/wallet/wallet.cpp

@ -2123,7 +2123,12 @@ void CWallet::GetSaplingNoteWitnesses(std::vector<SaplingOutPoint> 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++;

Loading…
Cancel
Save