MarcoFalke
commented at 6:36 pm on April 7, 2018:
member
The wallet header defined some globals (they were called “settings”), that should be class members instead.
This commit is hopefully only refactoring, apart from a multiwallet bugfix: Calling the rpc settxfee for one wallet, would set (and change) the fee rate for all loaded wallets. (See added test case)
MarcoFalke added the label
Wallet
on Apr 7, 2018
MarcoFalke added the label
RPC/REST/ZMQ
on Apr 7, 2018
MarcoFalke
commented at 6:36 pm on April 7, 2018:
member
For testing you can checkout this commit and run ./test/functional/wallet_multiwallet.py without compiling. It should fail.
MarcoFalke added the label
Needs release notes
on Apr 7, 2018
MarcoFalke force-pushed
on Apr 7, 2018
MarcoFalke removed the label
Needs release notes
on Apr 7, 2018
MarcoFalke force-pushed
on Apr 7, 2018
MarcoFalke force-pushed
on Apr 7, 2018
MarcoFalke force-pushed
on Apr 7, 2018
MarcoFalke force-pushed
on Apr 8, 2018
MarcoFalke force-pushed
on Apr 8, 2018
MarcoFalke force-pushed
on Apr 9, 2018
MarcoFalke force-pushed
on Apr 9, 2018
in
src/wallet/init.cpp:185
in
fad3bc5cefoutdated
170@@ -183,22 +171,6 @@ bool WalletInit::ParameterInteraction()
171 _("This is the transaction fee you may discard if change is smaller than dust at this level"));
172 CWallet::m_discard_rate = CFeeRate(nFeePerK);
173 }
174- if (gArgs.IsArgSet("-paytxfee"))
Is there a reason not to make options like -discardfee and -mintxfee wallet members, the same way this is doing for -fallbackfee and -paytxfee options? It doesn’t seem like a good thing to create a distinction here when moving the options together is possible.
Making more options members also seems nice in case we want to add a wallet RPC for changing preferences dynamically without affecting other wallets.
MarcoFalke
commented at 10:51 pm on April 9, 2018:
mintxfee et al are already members (static, though). I agree that those should be changed to be non-static members, but I’d rather do this in a follow up pr. Otherwise this one will explode in scope, scare away revierers and will gracelessly end up in rebase hell.
MarcoFalke
commented at 10:51 pm on April 9, 2018:
Making more options members also seems nice in case we want to add a wallet RPC for changing preferences dynamically without affecting other wallets.
Please see the included test case: We are already doing it wrong.
mintxfee et al are already members (static, though). I agree that those should be changed to be non-static members, but I’d rather do this in a follow up pr. Otherwise this one will explode in scope, scare away revierers and will gracelessly end up in rebase hell.
I think “wallet-specific fee options” would be an appropriate scope for this PR and not too broad. The -mintxfee, -fallbackfee, -discardfee, and -paytxfee options are literally initialized one after another here, so it’s strange to me that you want to move the second and fourth initializations but not the first and third based them on being global variables instead of static class member variables (since all the variables function identically).
laanwj
commented at 6:05 am on April 11, 2018:
member
Comment is kind of misleading. I think it would be more accurate to say “overrides” instead of “overwrites” now.
MarcoFalke
commented at 10:01 pm on April 17, 2018:
TIL those words mean different things. Thx and done. Should be trivial to re-ACK if you still have the previous commit.
ryanofsky
commented at 9:50 pm on April 17, 2018:
member
utACKfa66188a5c8b862695dd8d730f7c900bfd303dcf. This is great cleanup! It’s really nice to see these settings start to get consolidated and handled in a consistent way.
MarcoFalke force-pushed
on Apr 17, 2018
ryanofsky
commented at 10:37 pm on April 17, 2018:
member
utACKfafdeca1ec5d32291fe7b0313e123ad22d8e284b. Only change since the previous review is the updated RPC documentation string.
MarcoFalke force-pushed
on Apr 19, 2018
MarcoFalke force-pushed
on Apr 19, 2018
MarcoFalke
commented at 1:15 pm on April 19, 2018:
member
Clean rebase to reduce the diff (getting rid of deleted node-interface methods)
ryanofsky
commented at 1:20 pm on April 19, 2018:
member
utACKeeeea3c066f8b1351b911593aac7b062f48f1976, only change since last review is rebase
Seems a little weird to change this to constexpr and leave all the other default constants as static const. It’s fine, but can we have a follow-up PR to change the remaining constants to constexprs?
MarcoFalke
commented at 5:54 pm on April 19, 2018:
Sure. There is a bit of refactoring going on in the wallet, so I will wait until the dust settled a bit.
jnewbery
commented at 5:00 pm on April 19, 2018:
member
utACKeeeea3c066f8b1351b911593aac7b062f48f1976 with request for follow-up commit.
laanwj
commented at 10:11 am on April 23, 2018:
member
Sorry, needs rebase again
laanwj assigned laanwj
on Apr 23, 2018
jonasschnelli
commented at 12:00 pm on April 23, 2018:
contributor
Concept ACK (utACK on eeeea3c066f8b1351b911593aac7b062f48f1976 which though requires rebase).
MarcoFalke force-pushed
on Apr 23, 2018
wallet: Make fee settings non-static membersfac0db0ff8
MarcoFalke force-pushed
on Apr 23, 2018
MarcoFalke
commented at 2:53 pm on April 23, 2018:
member
Rebased
in
src/interfaces/node.h:29
in
fac0db0ff8
25@@ -26,11 +26,9 @@ class Coin;
26 class RPCTimerInterface;
27 class UniValue;
28 class proxyType;
29-enum class FeeReason;
MarcoFalke
commented at 11:33 pm on April 23, 2018:
Will leave it in for now, because I don’t want to go through another rebase-reACK iteration just for this. Also, there are redundant forward declarations in other parts of the code, so this is not making the overall problem worse.
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: 2025-06-18 18:13 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me