add bonus amount to -burn

This commit is contained in:
Denis Angell
2023-08-02 23:19:25 +02:00
parent 2c61c4a79d
commit d823050fb1

View File

@@ -1164,7 +1164,8 @@ Import::doApply()
bool const create = !sle; bool const create = !sle;
STAmount startBal = create ? STAmount(Import::computeStartingBonus(ctx_.view())) : sle->getFieldAmount(sfBalance); XRPAmount const bonusAmount = Import::computeStartingBonus(ctx_.view());
STAmount startBal = create ? STAmount(bonusAmount) : sle->getFieldAmount(sfBalance);
STAmount finalBal = startBal + burn; STAmount finalBal = startBal + burn;
if (finalBal < startBal) if (finalBal < startBal)
@@ -1219,7 +1220,8 @@ Import::doApply()
// update the ledger header // update the ledger header
ctx_.rawView().rawDestroyXRP(-burn.xrp()); XRPAmount totalBurn = XRPAmount{(burn.xrp() + bonusAmount)};
ctx_.rawView().rawDestroyXRP(-totalBurn);
return tesSUCCESS; return tesSUCCESS;
} }