For merge after v0.15 (or perhaps as a bugfix for v0.15)
- Adds better validation of bitcoin-cli wallet argument to make sure it is only specified once, and that is only ever picked up from the command line, not from a config file (which could have bad results if someone was writing a script and forgot a command line argument).
- Renames -usewallet to -wallet
If there is zero or one -wallet
argument in bitcoin.conf (ie single wallet mode), there is no change from pre-0.15 behaviour. No -wallet
argument is required for bitcoin.cli.
If there is more than one -wallet
argument in bitcoin.conf (ie multiwallet), then a single command-line -wallet
argument must be provided to bitcoin.cli.
It is always an error to specify more than one -wallet
command line argument, and the request will be rejected by bitcoin.cli on the client side.