mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Make sure OwnerCount adjustments are stored.
This commit is contained in:
@@ -893,8 +893,15 @@ void LedgerEntrySet::ownerCountAdjust(const uint160& uOwnerID, int iAmount, SLE:
|
||||
|
||||
const uint32 uOwnerCount = sleRoot->getFieldU32(sfOwnerCount);
|
||||
|
||||
if (iAmount + int(uOwnerCount) >= 0)
|
||||
const uint32 uNew = iAmount + int(uOwnerCount) > 0
|
||||
? uOwnerCount+iAmount
|
||||
: 0;
|
||||
|
||||
if (uOwnerCount != uNew)
|
||||
{
|
||||
sleRoot->setFieldU32(sfOwnerCount, uOwnerCount+iAmount);
|
||||
entryModify(sleRoot);
|
||||
}
|
||||
}
|
||||
|
||||
TER LedgerEntrySet::offerDelete(SLE::ref sleOffer, const uint256& uOfferIndex, const uint160& uOwnerID)
|
||||
|
||||
Reference in New Issue
Block a user