aboutsummaryrefslogtreecommitdiff
path: root/test/functional/wallet_startup.py
diff options
context:
space:
mode:
authorAndrew Chow <achow101-github@achow101.com>2020-06-22 17:58:18 -0400
committerAndrew Chow <achow101-github@achow101.com>2020-09-08 21:02:53 -0400
commit1bee1e6269b76b52b1eab9112d39c245beaa27a2 (patch)
tree1b437fa47cf89317a767c7e5ae25087283d5d28a /test/functional/wallet_startup.py
parent78cb45d72251e85db07e8500bbdd2e9460b132b2 (diff)
downloadbitcoin-1bee1e6269b76b52b1eab9112d39c245beaa27a2.tar.xz
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.
Diffstat (limited to 'test/functional/wallet_startup.py')
-rwxr-xr-xtest/functional/wallet_startup.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/functional/wallet_startup.py b/test/functional/wallet_startup.py
index cfc4edb8ee..d3119925f7 100755
--- a/test/functional/wallet_startup.py
+++ b/test/functional/wallet_startup.py
@@ -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)