Throw a logic error instead of asserting when we see weird witness shenanigans
This commit is contained in:
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user