Skip to content

test: Replace stale TODO with mempoolminfee test in wallet_send.py - #36705

Open
Conradgabe wants to merge 1 commit into
bitcoin:masterfrom
Conradgabe:test-send-fee-below-mempoolminfee
Open

Conradgabe wants to merge 1 commit into
bitcoin:masterfrom
Conradgabe:test-send-fee-below-mempoolminfee

Conversation

@Conradgabe

@Conradgabe Conradgabe commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

wallet_send.py had a commented-out TODO from the original send PR (#16378) about returning the hex when the fee rate is below the mempool minimum. The commented code was stale; estimate_mode="sat/b" no longer exists.

Also, an explicit fee_rate is only checked against max(-mintxfee, -minrelaytxfee), not against mempoolminfee (see src/wallet/fees.cpp), so when the mempool is full, send can build a tx the node won't accept.

This PR adds a subtest covering this cases and removes the stale TODO.

With add_to_wallet=false, the returned hex is rejected by testmempoolaccept, and with add_to_wallet=true, send reports success, but the tx stays only in the wallet, not the mempool.

@DrahtBot DrahtBot added the Tests label Oct 30, 2026
@DrahtBot

DrahtBot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

External sites

Reviews

See the guideline and AI policy for information on the review process.

Type Reviewers
ACK alwaysprince05

If your review is incorrectly listed, please copy-paste <!--meta-tag:bot-skip--> into the comment that the bot should ignore.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #36990 (test: replace hard-coded RPC error codes by l0rinc)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@fanquake

Copy link
Copy Markdown
Member

cc @Sjors

@DrahtBot

Copy link
Copy Markdown
Contributor

🚧 At least one of the CI tasks failed.
Task lint: https://github.com/bitcoin/bitcoin/actions/runs/41060222545/job/124145226184
LLM reason (✨ experimental): CI failed because Python lint detected whitespace on two lines in test/functional/wallet_send.py (a whitespace-only blank line and trailing space).

Hints

Try to run the tests locally, according to the documentation. However, a CI failure may still
happen due to a number of reasons, for example:

  • Possibly due to a silent merge conflict (the changes in this pull request being
    incompatible with the current code in the target branch). If so, make sure to rebase on the latest
    commit of the target branch.

  • A sanitizer issue, which can only be found by compiling with the sanitizer and running the
    affected test.

  • An intermittent issue.

Leave a comment here, if you need help tracking down a confusing failure.

@Conradgabe
Conradgabe force-pushed the test-send-fee-below-mempoolminfee branch from 87d1b55 to a2d3213 Compare October 31, 2026 07:40
@DrahtBot DrahtBot removed the CI failed label Nov 5, 2026
@alwaysprince05

Copy link
Copy Markdown
  • Tested on macOS, Apple Silicon.
  • wallet_send.py passes on the original PR.
  • I added a mutation in src/wallet/fees.cpp: explicit fee_rate path checks mempoolMinFee().
  • The new test fails at send with the reported 0.200 vs 0.677 sat/vB error.
  • Cwallet::CommitTransaction should be CWallet::CommitTransaction.

tACK a2d3213

@Conradgabe
Conradgabe force-pushed the test-send-fee-below-mempoolminfee branch from a2d3213 to 8711845 Compare November 9, 2026 15:43
@Conradgabe

Copy link
Copy Markdown
Contributor Author

Cwallet::CommitTransaction should be CWallet::CommitTransaction.

made the edit, thanks

@alwaysprince05

Copy link
Copy Markdown

reACK 8711845

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants