Summary
This PR removes the settxfee RPC and paytxfee setting (Bitcoin Core 31.0). These two features were deprecated in #31278.
Summary
This PR removes the settxfee RPC and paytxfee setting (Bitcoin Core 31.0). These two features were deprecated in #31278.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32138.
See the guideline for information on the review process.
| Type | Reviewers |
|---|---|
| ACK | w0xlt, rogersala21 |
| Concept ACK | theStack |
If your review is incorrectly listed, please copy-paste <!–meta-tag:bot-skip–> into the comment that the bot should ignore.
Reviewers, this pull request conflicts with the following ones:
CWallet::Create() into CreateNew and LoadExisting by davidgumberg)maxfeerate wallet startup option by ismaelsadeeq)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.
Possible places where named args for integral literals may be used (e.g. func(x, /*named_arg=*/0) in C++, and func(x, named_arg=0) in Python):
2026-01-28 16:13:17
🚧 At least one of the CI tasks failed. Debug: https://github.com/bitcoin/bitcoin/runs/39393296960
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.
🚧 At least one of the CI tasks failed.
Task lint: https://github.com/bitcoin/bitcoin/runs/48937774714
LLM reason (✨ experimental): Lint failure caused by an invalid Python shebang in test/functional/wallet_txn_clone.py (syntax error).
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.
m_pay_tx_fee. It is just dead code now, no?
It is just dead code now, no? @maflcko I think you’re right. Will squash after review, think it’s easier this way.
101@@ -102,7 +102,7 @@ void NotifyWalletLoaded(WalletContext& context, const std::shared_ptr<CWallet>&
102 std::unique_ptr<WalletDatabase> MakeWalletDatabase(const std::string& name, const DatabaseOptions& options, DatabaseStatus& status, bilingual_str& error);
103
104 //! -paytxfee default (paytxfee RPC was removed in v31.0)
105-constexpr CAmount DEFAULT_PAY_TX_FEE = 0;
106+//constexpr CAmount DEFAULT_PAY_TX_FEE = 0;
Will squash after review, think it’s easier this way.
I’d say to either squash now, or create meaningful separate commits. E.g:
Concept ACK
This should have a release note, and IIUC, the following part of the PR description doesn’t apply anymore:
This PR does not remove the internal implementation of the default value of paytxfee=0 but removes the option for users to modify it.
ACK 76a5e97671177e6f0f08bfd7c2ce13e7b273415d
Tested behavior before and after this PR, code lgtm.
Prior to this PR, settxfee was callable (with deprecation warning). With this PR it is fully removed and returns “Method not found”:
0$ bitcoin-cli settxfee 0.001
1error code: -32601
2error message:
3Method not found
The -paytxfee startup option is also rejected after this PR:
0$ bitcoind -paytxfee=0.001
1Error: Error parsing command line arguments: Invalid parameter -paytxfee=0.001
0@@ -0,0 +1,3 @@
1+RPC and Startup Option
2+---
3+The `-paytxfee` startup option and the `settxfee` RPC are now deleted after being deprected in Bitcoin Core 30.0. They used to allow the user to set a static fee rate for wallet transactions, which could potentially lead to overpaying or underpaying. Users should instead rely on fee estimation or specify a fee rate per transaction using the `fee_rate` argument in RPCs such as `fundrawtransaction`, `sendtoaddress`, `send`, `sendall`, and `sendmany`. (#32138)
0The `-paytxfee` startup option and the `settxfee` RPC are now deleted after being deprecated in Bitcoin Core 30.0. They used to allow the user to set a static fee rate for wallet transactions, which could potentially lead to overpaying or underpaying. Users should instead rely on fee estimation or specify a fee rate per transaction using the `fee_rate` argument in RPCs such as `fundrawtransaction`, `sendtoaddress`, `send`, `sendall`, and `sendmany`. (#32138)
There is still a reference to the removed m_pay_tx_fee here:
0--- a/src/wallet/coincontrol.h
1+++ b/src/wallet/coincontrol.h
2@@ -93,7 +93,7 @@ public:
3 bool m_allow_other_inputs = true;
4 //! Override automatic min/max checks on fee, m_feerate must be set if true
5 bool fOverrideFeeRate = false;
6- //! Override the wallet's m_pay_tx_fee if set
7+ //! Override the default wallet fee rate if set
8 std::optional<CFeeRate> m_feerate;
9 //! Override the default confirmation target if set
10 std::optional<unsigned int> m_confirm_target;
There’s also a remaining reference in src/qt/bitcoinstrings.cpp, although that file is auto-generated.
0--- a/src/qt/bitcoinstrings.cpp
1+++ b/src/qt/bitcoinstrings.cpp
2@@ -14,7 +14,6 @@ QT_TRANSLATE_NOOP("bitcoin-core", "%s is set very high!"),
3 QT_TRANSLATE_NOOP("bitcoin-core", "%s is set very high! Fees this large could be paid on a single transaction."),
4 QT_TRANSLATE_NOOP("bitcoin-core", "%s request to listen on port %u. This port is considered \"bad\" and thus it is unlikely that any peer will connect to it. See doc/p2p-bad-ports.md for details and a full list."),
5 QT_TRANSLATE_NOOP("bitcoin-core", "-maxmempool must be at least %d MB"),
6-QT_TRANSLATE_NOOP("bitcoin-core", "-paytxfee is deprecated and will be fully removed in v31.0."),
7 QT_TRANSLATE_NOOP("bitcoin-core", "A fatal internal error occurred, see debug.log for details: "),
8 QT_TRANSLATE_NOOP("bitcoin-core", "Assumeutxo data not found for the given blockhash '%s'."),
There’s also a remaining reference in
src/qt/bitcoinstrings.cpp, although that file is auto-generated.
Is this something I should take into account? Or will it get solved automatically?
There’s also a remaining reference in
src/qt/bitcoinstrings.cpp, although that file is auto-generated.Is this something I should take into account? Or will it get solved automatically?
No those are cleaned up by the pre-release translations update
polespinasa
DrahtBot
maflcko
theStack
rogersala21
w0xlt
achow101
Labels
Wallet
RPC/REST/ZMQ
Needs release note
Milestone
31.0