mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Don't charge for transactions twice. Have the "old" getTransaction handle metadata sanely.
Fix calcRawMeta to fit the new model where an LES holds a reference to its ledger Don't put metadata in open ledger txn sets to avoid breaking the proposal mechanism.
This commit is contained in:
@@ -430,10 +430,10 @@ TER TransactionEngine::applyTransaction(const SerializedTransaction& txn, Transa
|
||||
break;
|
||||
|
||||
case ttCONTRACT:
|
||||
terResult= doContractAdd(txn);
|
||||
terResult = doContractAdd(txn);
|
||||
break;
|
||||
case ttCONTRACT_REMOVE:
|
||||
terResult=doContractRemove(txn);
|
||||
terResult = doContractRemove(txn);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -461,14 +461,23 @@ TER TransactionEngine::applyTransaction(const SerializedTransaction& txn, Transa
|
||||
txnWrite();
|
||||
|
||||
Serializer s;
|
||||
|
||||
txn.add(s);
|
||||
|
||||
if (!mLedger->addTransaction(txID, s))
|
||||
assert(false);
|
||||
if (isSetBit(params, tapOPEN_LEDGER))
|
||||
{
|
||||
if (!mLedger->addTransaction(txID, s))
|
||||
assert(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
Serializer m;
|
||||
mNodes.calcRawMeta(m);
|
||||
if (!mLedger->addTransaction(txID, s, m))
|
||||
assert(false);
|
||||
|
||||
// Charge whatever fee they specified.
|
||||
mLedger->destroyCoins(saPaid.getNValue());
|
||||
// Charge whatever fee they specified.
|
||||
mLedger->destroyCoins(saPaid.getNValue());
|
||||
}
|
||||
}
|
||||
|
||||
mTxnAccount = SLE::pointer();
|
||||
|
||||
Reference in New Issue
Block a user