This makes the rpcs a bit more stateless by falling back to their own default max fee instead of the global maxTxFee.
A follow up pull request will move -maxtxfee to the wallet.
See also related discussions:
This makes the rpcs a bit more stateless by falling back to their own default max fee instead of the global maxTxFee.
A follow up pull request will move -maxtxfee to the wallet.
See also related discussions:
Concept ACK!
utACK fa96d7642178b5472b7aa76de9c8b86e7b9cde54. This looks great and is nicely done. But it definitely should have release notes noting change in behavior for sendrawtransaction and testmempoolaccept RPCs, which now ignore the -maxtxfee setting.
utACK https://github.com/bitcoin/bitcoin/pull/15620/commits/fa96d7642178b5472b7aa76de9c8b86e7b9cde54. Verified this replaces the only usages of maxTxFee global in rpc code.
$ git grep maxTxFee | grep rpc
src/rpc/rawtransaction.cpp: const CAmount highfee{allowhighfees ? 0 : ::maxTxFee};
src/rpc/rawtransaction.cpp: CAmount max_raw_tx_fee = ::maxTxFee;
How about bumpfee?
https://github.com/bitcoin/bitcoin/blob/93623eea71e7159e367b1b1888418099a5307983/src/wallet/feebumper.cpp#L161-L166
😮 space in L162
Bumpfee is a wallet function, so it's reasonable if it continues to use maxtxfee if maxtxfee becomes a wallet option.
38 | @@ -39,6 +39,7 @@ 39 | 40 | #include <univalue.h> 41 | 42 | +constexpr static CAmount DEFAULT_MAX_RAW_TX_FEE{COIN / 10};
There is already DEFAULT_TRANSACTION_MAXFEE in validation.h, isn't a new constant confusing?
Suggest a comment here. Something like:
/** High fee for sendrawtransaction and testmempoolaccept.
* By default, transaction with a fee higher than this will be rejected by
* sendrawtransaction and testmempoolaccept. This can be overriden with the
* maxfeerate argument.
* */
I think the release notes and rpc documentation are pretty clear on this. Lets not bloat developers with redundant or excessive documentation
promag was worried that there are two constants where one would theoretically be sufficient
Happy to change the name if there is a better one, though.
Anyway, changed my mind
nit, anonymous namespace instead?
Misinterpreted the goal sorry, IMO could have the title Uncouple non-wallet rpcs from maxTxFee global.
Agree with adding release notes.
Renamed title and added release notes as requested by @promag
0 | @@ -0,0 +1,11 @@ 1 | +Updated RPCs 2 | +------------ 3 | + 4 | +* The `sendrawtransaction` and `testmempoolaccept` previouly accepted an
In commit "doc: Add release notes for 15620" (faadaae4795038d77936f36483f1410cd92b3238)
s/previouly accepted/RPC methods previously accepted/
In commit "doc: Add release notes for 15620" (faadaae):
This is a nice, detailed description, but I think it would be nice to have a sentence at the beginning summarizing the whole paragraph, like "The -maxtxfee setting no longer has any effect on non-wallet RPCs. [...]"
Done
utACK faadaae4795038d77936f36483f1410cd92b3238, only change is release notes
Oops. I'd already written a branch for this too.
One comment inline, otherwise utACK fa4230b8a708ad9b848c97a5142da804afc43a4b.
Changed my mind as requested by @jnewbery
utACK fa1ad200d378fc3a4dc4c54214965d3c852db7d7
The above reference was a mistake.
utACK fa1ad20.
Concept ACK
utACK fa1ad200d378fc3a4dc4c54214965d3c852db7d7