Do not create default wallet
No longer create a default wallet. The default wallet will still be loaded if it exists and not other wallets were specified (anywhere, including settings.json, bitcoin.conf, and command line). Tests are updated to be started with -wallet= if they need the default wallet. Added test to wallet_startup.py testing that no default wallet is created and that it is loaded if it exists and no other wallets were specified.
This commit is contained in:
1 parent
78cb45d722
commit
1bee1e6269
18 files changed
+67
-43
No files matched your search
@@ -26,6 +26,16 @@ class WalletStartupTest(BitcoinTestFramework):
|
||||
self.start_nodes()
|
||||
|
||||
def run_test(self):
|
||||
self.log.info('Should start without any wallets')
|
||||
assert_equal(self.nodes[0].listwallets(), [])
|
||||
assert_equal(self.nodes[0].listwalletdir(), {'wallets': []})
|
||||
|
||||
self.log.info('New default wallet should load by default when there are no other wallets')
|
||||
self.nodes[0].createwallet(wallet_name='', load_on_startup=False)
|
||||
self.restart_node(0)
|
||||
assert_equal(self.nodes[0].listwallets(), [''])
|
||||
|
||||
self.log.info('Test load on startup behavior')
|
||||
self.nodes[0].createwallet(wallet_name='w0', load_on_startup=True)
|
||||
self.nodes[0].createwallet(wallet_name='w1', load_on_startup=False)
|
||||
self.nodes[0].createwallet(wallet_name='w2', load_on_startup=True)
|
||||
|
||||
Reference in new issue
Block a user