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

This commit is contained in:
Duke Leto
2020-05-29 23:32:41 -04:00
parent e35b7e21b3
commit 1010c7e8e4

View File

@@ -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++;