Running a CLI command when multiple wallets are loaded and -rpcwallet
is not specified, should return a clearer error.
Currently in master
:
0$ bitcoin-cli -regtest -generate 1
1error code: -19
2error message:
3Wallet file not specified (must request wallet RPC through /wallet/<filename> uri-path).
4Try adding "-rpcwallet=<filename>" option to bitcoin-cli command line.
With this change:
0$ bitcoin-cli -regtest -generate 1
1error code: -19
2error message:
3Multiple wallets are loaded. Please select which wallet to use by requesting the RPC through the /wallet/<walletname> URI path. Or for the CLI, specify the "-rpcwallet=<walletname>" option before the command (run "bitcoin-cli -h" for help or "bitcoin-cli listwallets" to see which wallets are currently loaded).