[wallet] Add high transaction fee warnings #8486
pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:Mf1607-walletHighFeeWarn changing 4 files +24 −8-
MarcoFalke commented at 1:50 pm on August 8, 2016: memberAdd missing warnings to mintxfee and minrelaytxfee (c.f warnings for fallbackfee and paytxfee)
-
MarcoFalke added the label Docs and Output on Aug 8, 2016
-
MarcoFalke added the label Wallet on Aug 8, 2016
-
MarcoFalke force-pushed on Aug 8, 2016
-
MarcoFalke force-pushed on Aug 8, 2016
-
in src/init.cpp: in fa304ad52c outdated
960+ if (!ParseMoney(mapArgs["-minrelaytxfee"], n)) 961 return InitError(AmountErrMsg("minrelaytxfee", mapArgs["-minrelaytxfee"])); 962+#ifdef ENABLE_WALLET 963+ if (!fDisableWallet && n > HIGH_TX_FEE_PER_KB) 964+ InitWarning(AmountHighWarn("-minrelaytxfee") + " " + 965+ _("This is the minimum transaction fee you pay on every transaction."));
sipa commented at 5:35 am on August 10, 2016:Minrelayfee influences more than the fee you pay yourself. Isn’t it a bit confusing to advertize it as just that?
MarcoFalke commented at 7:18 am on August 10, 2016:Right, but this is irrelevant for the wallet. If you run with the wallet disabled, you can use minrelayfee with the feefilter to approach a
-blocksonly
mode for minrelayfee → ∞.With the wallet enabled, it should warn when you are about to pay a fee too high.
I have moved this code to wallet.cpp to make that clearer.
in src/wallet/wallet.cpp: in fa304ad52c outdated
3442@@ -3441,6 +3443,7 @@ bool CWallet::ParameterInteraction() 3443 return InitError(AmountErrMsg("paytxfee", mapArgs["-paytxfee"])); 3444 if (nFeePerK > HIGH_TX_FEE_PER_KB) 3445 InitWarning(_("-paytxfee is set very high! This is the transaction fee you will pay if you send a transaction."));
sipa commented at 5:36 am on August 10, 2016:Use AmountHighWarn here as well?
MarcoFalke commented at 7:20 am on August 10, 2016:DoneMarcoFalke force-pushed on Aug 10, 2016sipa commented at 1:22 pm on August 25, 2016: memberutACKin src/init.cpp: in 0000b603d8 outdated
958- ::minRelayTxFee = CFeeRate(n); 959- else 960+ if (!ParseMoney(mapArgs["-minrelaytxfee"], n)) 961 return InitError(AmountErrMsg("minrelaytxfee", mapArgs["-minrelaytxfee"])); 962+ // High fee check is done afterward in CWallet::ParameterInteraction() 963+ ::minRelayTxFee = CFeeRate(n);
luke-jr commented at 3:13 am on August 29, 2016:Why is this being rearranged? It seems functionally identical except missing the n>0 check?
MarcoFalke commented at 7:47 am on August 29, 2016:We don’t use the
n>0
elsewhere because it is redundant:0src/test/util_tests.cpp: BOOST_CHECK(!ParseMoney("-1", ret));
Also, the syntax is preferable:
0if(fail) 1 return; 2doStuff();
vs
0if(!fail) 1 doStuff(); 2else 3 return;
luke-jr commented at 3:14 am on August 29, 2016: memberConcept ACK[wallet] Add high transaction fee warnings faef293cf3MarcoFalke force-pushed on Sep 25, 2016MarcoFalke commented at 8:07 am on September 26, 2016: member(trivial rebase)laanwj commented at 11:54 am on September 26, 2016: memberlaanwj merged this on Sep 26, 2016laanwj closed this on Sep 26, 2016
laanwj referenced this in commit ab0b411868 on Sep 26, 2016laanwj commented at 12:19 pm on September 26, 2016: memberDoesn’t his make setting a minrelaytxfee of 0 possible whereas it previously wasn’t?
This is in fact the case, good catch. Not sure if this is a problem, but I don’t think it was intended.
MarcoFalke deleted the branch on Sep 26, 2016codablock referenced this in commit 576a992597 on Sep 19, 2017codablock referenced this in commit d87c156f19 on Jan 11, 2018andvgal referenced this in commit 0205c52220 on Jan 6, 2019DrahtBot locked this on Sep 8, 2021
github-metadata-mirror
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-12-19 03:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me