mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-22 03:55:53 +00:00
Make sure finally negative offers are not processed.
This commit is contained in:
@@ -458,8 +458,19 @@ TER OfferCreateTransactor::doApply()
|
||||
// cLog(lsWARNING) << "OfferCreate: takeOffers: uPaysIssuerID=" << RippleAddress::createHumanAccountID(uPaysIssuerID);
|
||||
// cLog(lsWARNING) << "OfferCreate: takeOffers: uGetsIssuerID=" << RippleAddress::createHumanAccountID(uGetsIssuerID);
|
||||
|
||||
if (tesSUCCESS != terResult
|
||||
|| !saTakerPays // Wants nothing more.
|
||||
if (tesSUCCESS != terResult)
|
||||
{
|
||||
// Fail as is.
|
||||
nothing();
|
||||
}
|
||||
else if (saTakerPays.isNegative() || saTakerGets.isNegative())
|
||||
{
|
||||
terResult = isSetBit(mParams, tapOPEN_LEDGER)
|
||||
? telFAILED_PROCESSING // Ledger is not final, can vote no.
|
||||
: tecFAILED_PROCESSING;
|
||||
}
|
||||
else if (
|
||||
!saTakerPays // Wants nothing more.
|
||||
|| !saTakerGets // Offering nothing more.
|
||||
|| bMarket // Do not persist.
|
||||
|| !mEngine->getNodes().accountFunds(mTxnAccountID, saTakerGets).isPositive() // Not funded.
|
||||
|
||||
Reference in New Issue
Block a user