Filters addhdkey arguments from RPC console history, consistent with other RPCs that handle private key material.
This prevents extended private keys from being retained in history. It also covers the mnemonic and passphrase inputs proposed in bitcoin/bitcoin#35857.
Adds a parser test verifying that the arguments are redacted.
Motivation
addhdkey accepts a BIP 32 extended private key, but its arguments are currently retained in RPC console history, unlike other RPCs that handle private key material.
The same filter would also protect the mnemonic and passphrase inputs proposed in bitcoin/bitcoin#35857.
Changes
- Add
addhdkeyto the RPC console sensitive-command filter. - Add a parser test verifying that its arguments are redacted as
addhdkey(…).
Tests
./build_gui/bin/test_bitcoin-qt— all tests passed, includingRPCNestedTests::rpcNestedTests().