mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-03 20:35:17 +02:00
Fix nonsensical bitcoin-cli -norpcwallet behavior
Treat specifying -norpcwallet the same as not specifying any -rpcwallet option,
instead of treating it like -rpcwallet=0 with 0 as the wallet name.
This restores previous behavior before 743077544b
from https://github.com/bitcoin/bitcoin/pull/18594, which inadvertently changed
it.
This commit is contained in:
@@ -279,6 +279,10 @@ class TestBitcoinCli(BitcoinTestFramework):
|
||||
assert_equal(cli_get_info['Wallet'], wallets[1])
|
||||
assert_equal(Decimal(cli_get_info['Balance']), amounts[1])
|
||||
|
||||
self.log.info("Test -getinfo -norpcwallet returns the same as -getinfo")
|
||||
# Previously there was a bug where -norpcwallet was treated like -rpcwallet=0
|
||||
assert_equal(self.nodes[0].cli('-getinfo', "-norpcwallet").send_cli(), cli_get_info_string)
|
||||
|
||||
self.log.info("Test -getinfo with -rpcwallet=remaining-non-default-wallet returns only its balance")
|
||||
cli_get_info_string = self.nodes[0].cli('-getinfo', rpcwallet2).send_cli()
|
||||
cli_get_info = cli_get_info_string_to_dict(cli_get_info_string)
|
||||
|
||||
Reference in New Issue
Block a user