diff --git a/src/xrpld/app/ledger/detail/BuildLedger.cpp b/src/xrpld/app/ledger/detail/BuildLedger.cpp index c4d5c7aa6..c608d66b3 100644 --- a/src/xrpld/app/ledger/detail/BuildLedger.cpp +++ b/src/xrpld/app/ledger/detail/BuildLedger.cpp @@ -100,6 +100,7 @@ buildLedgerImpl( std::size_t applyTransactions( Application& app, + std::shared_ptr const& parent, std::shared_ptr const& built, CanonicalTXSet& txns, std::set& failed, @@ -109,7 +110,7 @@ applyTransactions( bool certainRetry = true; std::size_t count = 0; - ApplyOptions const applyOptions{}; + ApplyOptions const applyOptions{parent}; //@@start rng-entropy-first-application // CRITICAL: Apply consensus entropy pseudo-tx FIRST before any other @@ -257,8 +258,8 @@ buildLedger( JLOG(j.debug()) << "Attempting to apply " << txns.size() << " transactions"; - auto const applied = - applyTransactions(app, built, txns, failedTxns, accum, j); + auto const applied = applyTransactions( + app, parent, built, txns, failedTxns, accum, j); if (!txns.empty() || !failedTxns.empty()) JLOG(j.debug()) << "Applied " << applied << " transactions; " diff --git a/src/xrpld/app/tx/detail/Change.cpp b/src/xrpld/app/tx/detail/Change.cpp index 209ef698d..967bc108e 100644 --- a/src/xrpld/app/tx/detail/Change.cpp +++ b/src/xrpld/app/tx/detail/Change.cpp @@ -19,7 +19,6 @@ #include #include -#include #include #include #include @@ -379,10 +378,7 @@ Change::applyExportSignatures() auto const account = signingPayload->getAccountID(sfAccount); auto const latchKey = keylet::exportLatch(account, origin); - auto parent = ctx_.replayParentLedger(); - if (!parent) - parent = ctx_.app.getLedgerMaster().getLedgerByHash( - view().info().parentHash); + auto const parent = ctx_.replayParentLedger(); if (!parent || parent->info().hash != view().info().parentHash) return tefBAD_LEDGER;