bug fixes, ensure import invariant is correct

This commit is contained in:
Richard Holland
2023-07-11 13:19:21 +00:00
parent f06124e8c7
commit 4f86551fb3
4 changed files with 22 additions and 33 deletions

View File

@@ -196,7 +196,13 @@ XRPNotCreated::finalize(
<< " drops_: " << drops_
<< " dropsAdded - fee.drops(): " << dropsAdded - fee.drops();
return (drops_ == dropsAdded.drops() - fee.drops());
int64_t drops = dropsAdded.drops() - fee.drops();
// catch any overflow or funny business
if (drops > dropsAdded.drops() || drops > fee.drops())
return false;
return drops_ == drops;
}