mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Change sfDirectory to sfBookDirectory.
This commit is contained in:
@@ -48,7 +48,7 @@ LedgerEntryFormat LedgerFormats[]=
|
|||||||
{ S_FIELD(Sequence), STI_UINT32, SOE_REQUIRED, 0 },
|
{ S_FIELD(Sequence), STI_UINT32, SOE_REQUIRED, 0 },
|
||||||
{ S_FIELD(TakerPays), STI_AMOUNT, SOE_REQUIRED, 0 },
|
{ S_FIELD(TakerPays), STI_AMOUNT, SOE_REQUIRED, 0 },
|
||||||
{ S_FIELD(TakerGets), STI_AMOUNT, SOE_REQUIRED, 0 },
|
{ S_FIELD(TakerGets), STI_AMOUNT, SOE_REQUIRED, 0 },
|
||||||
{ S_FIELD(Directory), STI_HASH256, SOE_REQUIRED, 0 },
|
{ S_FIELD(BookDirectory), STI_HASH256, SOE_REQUIRED, 0 },
|
||||||
{ S_FIELD(BookNode), STI_UINT64, SOE_REQUIRED, 0 },
|
{ S_FIELD(BookNode), STI_UINT64, SOE_REQUIRED, 0 },
|
||||||
{ S_FIELD(OwnerNode), STI_UINT64, SOE_REQUIRED, 0 },
|
{ S_FIELD(OwnerNode), STI_UINT64, SOE_REQUIRED, 0 },
|
||||||
{ S_FIELD(PaysIssuer), STI_ACCOUNT, SOE_IFFLAG, 1 },
|
{ S_FIELD(PaysIssuer), STI_ACCOUNT, SOE_IFFLAG, 1 },
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ enum SOE_Field
|
|||||||
sfAmount,
|
sfAmount,
|
||||||
sfAuthorizedKey,
|
sfAuthorizedKey,
|
||||||
sfBalance,
|
sfBalance,
|
||||||
|
sfBookDirectory,
|
||||||
sfBookNode,
|
sfBookNode,
|
||||||
sfBorrowExpire,
|
sfBorrowExpire,
|
||||||
sfBorrowRate,
|
sfBorrowRate,
|
||||||
@@ -42,7 +43,6 @@ enum SOE_Field
|
|||||||
sfCurrencyIn,
|
sfCurrencyIn,
|
||||||
sfCurrencyOut,
|
sfCurrencyOut,
|
||||||
sfDestination,
|
sfDestination,
|
||||||
sfDirectory,
|
|
||||||
sfDomain,
|
sfDomain,
|
||||||
sfEmailHash,
|
sfEmailHash,
|
||||||
sfExpiration,
|
sfExpiration,
|
||||||
|
|||||||
@@ -306,11 +306,11 @@ STAmount TransactionEngine::accountSend(const uint160& uSenderID, const uint160&
|
|||||||
TransactionEngineResult TransactionEngine::offerDelete(const SLE::pointer& sleOffer, const uint256& uOfferIndex, const uint160& uOwnerID)
|
TransactionEngineResult TransactionEngine::offerDelete(const SLE::pointer& sleOffer, const uint256& uOfferIndex, const uint160& uOwnerID)
|
||||||
{
|
{
|
||||||
uint64 uOwnerNode = sleOffer->getIFieldU64(sfOwnerNode);
|
uint64 uOwnerNode = sleOffer->getIFieldU64(sfOwnerNode);
|
||||||
TransactionEngineResult terResult = dirDelete(true, uOwnerNode, Ledger::getOwnerDirIndex(uOwnerID), uOfferIndex);
|
TransactionEngineResult terResult = dirDelete(false, uOwnerNode, Ledger::getOwnerDirIndex(uOwnerID), uOfferIndex);
|
||||||
|
|
||||||
if (terSUCCESS == terResult)
|
if (terSUCCESS == terResult)
|
||||||
{
|
{
|
||||||
uint256 uDirectory = sleOffer->getIFieldH256(sfDirectory);
|
uint256 uDirectory = sleOffer->getIFieldH256(sfBookDirectory);
|
||||||
uint64 uBookNode = sleOffer->getIFieldU64(sfBookNode);
|
uint64 uBookNode = sleOffer->getIFieldU64(sfBookNode);
|
||||||
|
|
||||||
terResult = dirDelete(false, uBookNode, uDirectory, uOfferIndex);
|
terResult = dirDelete(false, uBookNode, uDirectory, uOfferIndex);
|
||||||
@@ -1360,7 +1360,7 @@ TransactionEngineResult TransactionEngine::doCreditSet(const SerializedTransacti
|
|||||||
// Zero balance and eliminating last limit.
|
// Zero balance and eliminating last limit.
|
||||||
|
|
||||||
bDelIndex = true;
|
bDelIndex = true;
|
||||||
terResult = dirDelete(true, uSrcRef, Ledger::getRippleDirIndex(mTxnAccountID), sleRippleState->getIndex());
|
terResult = dirDelete(false, uSrcRef, Ledger::getRippleDirIndex(mTxnAccountID), sleRippleState->getIndex());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -1957,6 +1957,7 @@ TransactionEngineResult TransactionEngine::doInvoice(const SerializedTransaction
|
|||||||
// <-- saTakerGot: What taker got not including fees. To reduce an offer.
|
// <-- saTakerGot: What taker got not including fees. To reduce an offer.
|
||||||
// <-- terResult: terSUCCESS or terNO_ACCOUNT
|
// <-- terResult: terSUCCESS or terNO_ACCOUNT
|
||||||
// Note: All SLE modifications must always occur even on failure.
|
// Note: All SLE modifications must always occur even on failure.
|
||||||
|
// XXX: Fees should be paid by the source of the currency.
|
||||||
TransactionEngineResult TransactionEngine::takeOffers(
|
TransactionEngineResult TransactionEngine::takeOffers(
|
||||||
bool bPassive,
|
bool bPassive,
|
||||||
const uint256& uBookBase,
|
const uint256& uBookBase,
|
||||||
@@ -2320,7 +2321,7 @@ Log(lsWARNING) << "doOfferCreate: saTakerGets=" << saTakerGets.getFullText();
|
|||||||
|
|
||||||
sleOffer->setIFieldAccount(sfAccount, mTxnAccountID);
|
sleOffer->setIFieldAccount(sfAccount, mTxnAccountID);
|
||||||
sleOffer->setIFieldU32(sfSequence, uSequence);
|
sleOffer->setIFieldU32(sfSequence, uSequence);
|
||||||
sleOffer->setIFieldH256(sfDirectory, uDirectory);
|
sleOffer->setIFieldH256(sfBookDirectory, uDirectory);
|
||||||
sleOffer->setIFieldAmount(sfTakerPays, saTakerPays);
|
sleOffer->setIFieldAmount(sfTakerPays, saTakerPays);
|
||||||
sleOffer->setIFieldAmount(sfTakerGets, saTakerGets);
|
sleOffer->setIFieldAmount(sfTakerGets, saTakerGets);
|
||||||
sleOffer->setIFieldU64(sfOwnerNode, uOwnerNode);
|
sleOffer->setIFieldU64(sfOwnerNode, uOwnerNode);
|
||||||
|
|||||||
Reference in New Issue
Block a user