test: merge mining options in package feerate check
What changed, and why it matters
This is a small test-only code change in Bitcoin Core. It updates a single unit test to use a helper function that merges mining options instead of using a raw mining arguments object directly. There is no change to production code, no network behavior change, and no security fix.
No security action needed. This is a routine test code change.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit modifies src/test/miner_tests.cpp. It adds an include for node/mining_args.h and changes one BlockAssembler construction in TestPackageSelection to pass MergeMiningOptions(options, m_node.mining_args) instead of m_node.mining_args alone. This is a test refactoring/correction tied to a code review discussion on PR #33966. It does not alter consensus, mempool, or P2P logic.
Changed components
src/test/miner_tests.cppInspect captured patch +2 / −1
diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp
index fd9559b5..1b8fd62c 100644
--- a/src/test/miner_tests.cpp
+++ b/src/test/miner_tests.cpp
@@ -13,6 +13,7 @@
#include <interfaces/types.h>
#include <kernel/chainparams.h>
#include <node/miner.h>
+#include <node/mining_args.h>
#include <node/mining_types.h>
#include <policy/feerate.h>
#include <policy/policy.h>
@@ -197,7 +198,7 @@ void MinerTestingSetup::TestPackageSelection(const CScript& scriptPubKey, const
const auto block_package_feerates = BlockAssembler{
m_node.chainman->ActiveChainstate(),
&tx_mempool,
- m_node.mining_args,
+ MergeMiningOptions(options, m_node.mining_args),
}.CreateNewBlock()->m_package_feerates;
BOOST_CHECK(block_package_feerates.size() == 2);
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.