mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
add bonus amount to -burn
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user