Merge de942511a6 into merged_master (Elements PR #1239)

bitcoin/bitcoin#23381 refactored PolicyScriptChecks to store the
precomputed txdata in the workspace, so I have added the genesis hash to
the transform of the workspaces in AcceptMultipleTransactions.

I don't think there was a specific test for this, so during review it
may be worth checking this thoroughly. We also need a test to cover
this.
This commit is contained in:
Byron Hambly 2023-07-03 13:21:40 +00:00
commit 88d211dbfd

View file

@ -1284,7 +1284,7 @@ PackageMempoolAcceptResult MemPoolAccept::AcceptMultipleTransactions(const std::
std::vector<Workspace> workspaces{};
workspaces.reserve(txns.size());
std::transform(txns.cbegin(), txns.cend(), std::back_inserter(workspaces),
[](const auto& tx) { return Workspace(tx); });
[&](const auto& tx) { return Workspace(tx, args.m_chainparams.HashGenesisBlock()); });
std::map<const uint256, const MempoolAcceptResult> results;
LOCK(m_pool.cs);