mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-23 12:35:50 +00:00
Add tfMarket support to OfferCreate.
This commit is contained in:
@@ -321,6 +321,7 @@ TER OfferCreateTransactor::doApply()
|
|||||||
cLog(lsWARNING) << "OfferCreate> " << mTxn.getJson(0);
|
cLog(lsWARNING) << "OfferCreate> " << mTxn.getJson(0);
|
||||||
const uint32 uTxFlags = mTxn.getFlags();
|
const uint32 uTxFlags = mTxn.getFlags();
|
||||||
const bool bPassive = isSetBit(uTxFlags, tfPassive);
|
const bool bPassive = isSetBit(uTxFlags, tfPassive);
|
||||||
|
const bool bMarket = isSetBit(uTxFlags, tfMarket);
|
||||||
STAmount saTakerPays = mTxn.getFieldAmount(sfTakerPays);
|
STAmount saTakerPays = mTxn.getFieldAmount(sfTakerPays);
|
||||||
STAmount saTakerGets = mTxn.getFieldAmount(sfTakerGets);
|
STAmount saTakerGets = mTxn.getFieldAmount(sfTakerGets);
|
||||||
|
|
||||||
@@ -460,6 +461,7 @@ TER OfferCreateTransactor::doApply()
|
|||||||
if (tesSUCCESS != terResult
|
if (tesSUCCESS != terResult
|
||||||
|| !saTakerPays // Wants nothing more.
|
|| !saTakerPays // Wants nothing more.
|
||||||
|| !saTakerGets // Offering nothing more.
|
|| !saTakerGets // Offering nothing more.
|
||||||
|
|| bMarket // Do not persist.
|
||||||
|| !mEngine->getNodes().accountFunds(mTxnAccountID, saTakerGets).isPositive() // Not funded.
|
|| !mEngine->getNodes().accountFunds(mTxnAccountID, saTakerGets).isPositive() // Not funded.
|
||||||
|| bUnfunded) // Consider unfunded.
|
|| bUnfunded) // Consider unfunded.
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -68,7 +68,8 @@ const uint32 tfAccountSetMask = ~(tfRequireDestTag|tfOptionalDestTag|tfRequireA
|
|||||||
|
|
||||||
// OfferCreate flags:
|
// OfferCreate flags:
|
||||||
const uint32 tfPassive = 0x00010000;
|
const uint32 tfPassive = 0x00010000;
|
||||||
const uint32 tfOfferCreateMask = ~(tfPassive);
|
const uint32 tfMarket = 0x00020000;
|
||||||
|
const uint32 tfOfferCreateMask = ~(tfPassive|tfMarket);
|
||||||
|
|
||||||
// Payment flags:
|
// Payment flags:
|
||||||
const uint32 tfNoRippleDirect = 0x00010000;
|
const uint32 tfNoRippleDirect = 0x00010000;
|
||||||
|
|||||||
Reference in New Issue
Block a user