fix bonus overflow

This commit is contained in:
Denis Angell
2023-08-11 06:16:50 -04:00
parent 1cb0e428b7
commit 786b559b05

View File

@@ -1220,7 +1220,8 @@ Import::doApply()
// update the ledger header
XRPAmount totalBurn = XRPAmount{(burn.xrp() + bonusAmount)};
XRPAmount totalBurn =
XRPAmount{(burn.xrp() + (create ? bonusAmount : beast::zero))};
ctx_.rawView().rawDestroyXRP(-totalBurn);
return tesSUCCESS;