Rescuing uncontroversial parts of #5891
Alternative to #8746
If we’re adding privkey stuff here, then signmessagewithprivkey
needs to be added.
Won’t those commands not show up in history? I think it should at least show that the command happened.
@sipa If signrawtransaction
is split, there will likely still be users trying to use the old usage for at least one release, so I’m not sure it makes sense to remove it from the filter, at least not at the same time?
@achow101 I agree it would be better to add dummy history items, but comments on previous PRs seem to suggest that is a source of disagreement.
Added signmessagewithprivkey
to the filter.
Instead of masking out the arguments as I did in my PR, what if you just added the command name to the history.
Would work for me. My main comment on doing it @achow101 ’s way with masking individual arguments is just that that is too brittle and hard to maintain. If having just the command name to the history is useful in any way, which I doubt a bit with the incredible autocompletion that the debug console has these days, you could do that.
walletpassphrase
(should this be done in a different pull request?)getnewaddress(walletpassphrase(test))
results in executing walletpassphrase(test)
but actually not “hiding” the passphrase from the history.72+ << "signmessagewithprivkey"
73+ << "signrawtransaction"
74+ << "walletpassphrase"
75+ << "walletpassphrasechange"
76+ << "encryptwallet";
77+
importmulti
now.
Shell-like, but doesn't store changed history commands until executing it.
Filters importprivkey, signrawtransaction, walletpassphrase, walletpassphrasechange, and encryptwallet
Original code was missing braces, and short-circuited before checking everything after importprivkey
Wshadow
statistics:
1 qt/rpcconsole.cpp:173:56: warning: declaration shadows a local variable [-Wshadow]
0qt/rpcconsole.cpp:173:56: warning: declaration shadows a local variable [-Wshadow]
1 auto add_to_current_stack = [&](const std::string& curarg) {
2 ^
3qt/rpcconsole.cpp:167:17: note: previous declaration is here
4 std::string curarg;
5 ^
61 warning generated.
curarg
inside the block shadows curarg
outside.
[&]
was only supposed to capture stuff actually referenced?