fix ledger header accounting for genesismint/import

This commit is contained in:
Richard Holland
2023-08-01 08:38:21 +00:00
parent 264f25c2a6
commit febdb1c9c2
3 changed files with 43 additions and 6 deletions

View File

@@ -1204,6 +1204,15 @@ Import::doApply()
}
}
// update ledger header
if (burn <= beast::zero || burn.xrp() + view().info().drops < view().info().drops)
{
JLOG(ctx_.journal.warn())
<< "Import: ledger header overflowed\n";
return tecINTERNAL;
}
ctx_.rawView().rawDestroyXRP(-burn.xrp());
return tesSUCCESS;
}