rpc: Don’t ignore -maxtxfee
when wallet is disabled
#15357
pull
JBaczuk
wants to merge
1
commits into
bitcoin:master
from
JBaczuk:fix_maxtxfee
changing
2
files
+16 −15
-
JBaczuk commented at 6:47 pm on February 6, 2019: contributorResolves #15355
-
in src/init.cpp:814 in 81e9788de0 outdated
805@@ -806,6 +806,22 @@ void InitParameterInteraction() 806 LogPrintf("%s: parameter interaction: -whitelistforcerelay=1 -> setting -whitelistrelay=1\n", __func__); 807 } 808 809+ // This is required by both the wallet and node 810+ if (gArgs.IsArgSet("-maxtxfee")) 811+ { 812+ CAmount nMaxFee = 0; 813+ if (!ParseMoney(gArgs.GetArg("-maxtxfee", ""), nMaxFee)) 814+ InitError(AmountErrMsg("maxtxfee", gArgs.GetArg("-maxtxfee", "")));
ryanofsky commented at 7:00 pm on February 6, 2019:return InitError
has been changed to justInitError
here so I think this changes behavior.Maybe this code should move to the
AppInitParameterInterfaction
function instead ofInitParameterInterfaction
to avoid needing this change.
JBaczuk commented at 7:55 pm on February 6, 2019:I wasn’t sure about that, butWalletInit::ParameterInteraction
returned a bool andInitParameterInteraction
returns void, so I removed it.InitParameterInteraction
looks like it will work, though.
MarcoFalke commented at 8:03 pm on February 6, 2019:looks like it will work
Did you test that the initialization is aborted when you supply an invalid maxtxfee?
JBaczuk commented at 5:19 am on February 7, 2019:Did you test that the initialization is aborted when you supply an invalid maxtxfee?
It will not abort unless it returns. I’ll move it to
AppInitParameterInteraction
so it can return and abort.DrahtBot commented at 8:45 pm on February 6, 2019: memberThe following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #15340 (gui: Introduce bilingual GUI error messages by hebasto)
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 added the label Refactoring on Feb 6, 2019JBaczuk commented at 5:23 am on February 7, 2019: contributorOk I’ve tested and it does abort if invalid, and issues a warning if fee is too high.Empact commented at 12:47 pm on February 7, 2019: memberMaybe move it up to around line 1099, to sit alongside the other fee-related options handling?MarcoFalke renamed this:
Move maxTxFee initialization to init.cpp
rpc: Don't ignore `-maxtxfee` when wallet is disabled
on Feb 7, 2019MarcoFalke added the label RPC/REST/ZMQ on Feb 7, 2019MarcoFalke removed the label Refactoring on Feb 7, 2019JBaczuk commented at 5:51 am on February 8, 2019: contributorMaybe move it up to around line 1099, to sit alongside the other fee-related options handling?
done
fanquake deleted a comment on Feb 8, 2019MarcoFalke commented at 1:50 pm on February 8, 2019: memberPlease squash your commits according to https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md#squashing-commits. There is no need to keep the git history around in this pull request.Move maxTxFee initialization to init.cpp dfbf117bbbJBaczuk force-pushed on Feb 8, 2019jnewbery commented at 2:23 pm on February 8, 2019: memberutACK dfbf117bbb82c76c8cb60dba73ae7d653e3b8348 because it at least makes behaviour consistent. I still don’t think that-maxtxfee
should be shared between the node and wallet, so this doesn’t fully address my concerns in #15355. Reasoning here: #15355 (comment).MarcoFalke commented at 4:29 pm on February 8, 2019: memberACK dfbf117bbb82c76c8cb60dba73ae7d653e3b8348.
Checked that it is no longer ignored when the wallet is not compiled or not enabled:
0$ ./configure --disable-wallet && make 1$ ./src/qt/bitcoin-qt -maxtxfee=foobar 2Error: Invalid amount for -maxtxfee=<amount>: 'foobar' 3 4$ ./configure && make 5$ ./src/qt/bitcoin-qt -maxtxfee=foobar -disablewallet 6Error: Invalid amount for -maxtxfee=<amount>: 'foobar'
MarcoFalke added this to the milestone 0.18.0 on Feb 8, 2019ryanofsky approvedryanofsky commented at 7:20 pm on February 8, 2019: memberutACK dfbf117bbb82c76c8cb60dba73ae7d653e3b8348, confirmed move only.MarcoFalke merged this on Feb 8, 2019MarcoFalke closed this on Feb 8, 2019
MarcoFalke referenced this in commit 2945492424 on Feb 8, 2019Munkybooty referenced this in commit 139a98561d on Aug 27, 2021Munkybooty referenced this in commit 56a4ffa535 on Aug 28, 2021Munkybooty referenced this in commit 5e9a6baeab on Aug 29, 2021Munkybooty referenced this in commit 504f40e3de on Sep 1, 2021Munkybooty referenced this in commit e47609493c on Sep 5, 2021Munkybooty referenced this in commit 4efa0a69b6 on Sep 7, 2021Munkybooty referenced this in commit 3a9a1cb2eb on Sep 7, 2021Munkybooty referenced this in commit c4b8697a7f on Sep 9, 2021Munkybooty referenced this in commit 2d5cdd45b8 on Sep 10, 2021Munkybooty referenced this in commit ae4bea6052 on Sep 13, 2021DrahtBot locked this on Dec 16, 2021
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-17 09:12 UTC
More mirrored repositories can be found on mirror.b10c.me