#35598 test: cover feeThreshold = MAX_MONEY in interface_ipc_mining.py

full analysis

https://github.com/bitcoin/bitcoin/pull/35598 · Sjors · +27/-11 in 2 files, 1 commits · labels: Tests

Goal

  • Test that mining IPC template generation correctly ignores mempool fee increases when configured to do so
  • Prevent silent regressions in template notifications for mining clients that only wait for new block tips

This pull request adds functional test coverage to interface_ipc_mining.py for BlockWaitOptions with feeThreshold set to MAX_MONEY. It verifies that waitNext() ignores mempool fee increases and waits only for block tip updates without redundantly assembling new templates.

Problem: The mining IPC waitNext interface option to skip fee-based template updates lacked functional test coverage, allowing potential regressions in tip-versus-fee update handling to go undetected.

Category: Mining (#6 of 13)

P3 · test coverage

  • P3 because it adds functional test coverage for an existing mining interface configuration
  • Validates template update behavior without introducing new node functionality
  • Helps unblock follow-up mining IPC work

P3 because it provides meaningful test coverage for an existing option in the mining template interface. Sjors noted this covers 'pre-existing waitNext() behavior' when clients want tip notifications without fee-triggered block template construction.

Membership: Tests the Mining interface and its template update wait logic (waitNext) via interface_ipc_mining.py.

Factors: security/stability 0, bug 0, performance 0, user value 0, leverage 1

Reviewability: Ready

  • Ready for review
  • All reviewer feedback has been incorporated and CI is passing

The code is compact, passing CI, and all suggestions from reviewers have been incorporated.

Author status: active, addressed all review feedback and force-pushed updates

Resolved concerns:

  • davidgumberg noted that due to internal 1-second fee ticks and short test sleeps, the initial test passed even without MAX_MONEY working; fixed by adjusting wait times and parameterizing wait_and_do.
  • jeanpablojp suggested adding an assertion that CreateNewBlock() is not logged to ensure template creation is completely bypassed; addressed in the latest push.
  • enirox001 suggested consuming the existing mempool fee increase directly instead of sending an additional transaction; addressed in the latest push.

Agreement: Strong

  • Strong support for adding this test coverage as a standalone change (enirox001)
  • Approach approval with suggested assertions incorporated (jeanpablojp)
  • Timing and fee-polling improvements incorporated (davidgumberg)

Strong: davidgumberg caught test timing issues which were fixed; enirox001 and jeanpablojp support the coverage.

Multiple reviewers reviewed the functional test in detail, catching subtle timing quirks in waitNext(); all feedback was incorporated and reviewers supported the change.

  • enirox001: 'It is useful to have this coverage, and it makes sense as a standalone pr.'
  • jeanpablojp: 'Approach ACK'
  • davidgumberg contributed timing improvements and was credited as co-author.

Objections:

ReviewerKindHarmStatusBlockingAuthor repliedQuote
davidgumbergcorrectnessThe test passed even with feeThreshold = 1 because WaitAndCreateNewBlock() was sleeping through the 0.1s wait_and_do windowresolvedyesyes2026-07-02: 'The test still passes with waitoptions.feeThreshold = 1 That is because WaitAndCreateNewBlock() checks for a tip update immediately and then goes to sleep'
Settled: 2026-07-02: 'Turns out it was a a good idea to make this a separate PR. Fixed'

Support:

  • enirox001: Useful coverage that makes sense in an isolated PR
  • jeanpablojp: Approach ACK with suggestions for stricter assertion coverage

Participants: enirox001 (support), davidgumberg (objection), jeanpablojp (support)

State derived from the lists: substantive support, no open objection (enirox001, jeanpablojp)

Review verdicts (DrahtBot): 0 (+1)

Files

38 lines under test/bench/ci.

  • test/functional/interface_ipc_mining.py +25/-9
  • test/functional/test_framework/ipc_util.py +2/-2

Card

This PR adds functional test coverage in interface_ipc_mining.py for BlockWaitOptions with feeThreshold set to MAX_MONEY, verifying that waitNext() triggers only on new chain tips and avoids redundant template construction. Extracted as a standalone improvement from #33922, it exercises pre-existing mining interface behavior. Reviewers helped correct test timing and strengthen assertions. The PR is ready for review with strong reviewer alignment and no open blockers.

Data

dossier JSON · extract JSON · model openrouter/google/gemini-3.8-flash, generated 2026-09-17T21:34, confidence high, input hash a322375c31944556