@@ -38,6 +38,8 @@ def wallet_file(name):
3838 return wallet_dir (name , "wallet.dat" )
3939 return wallet_dir (name )
4040
41+ assert_equal (self .nodes [0 ].listwalletdir (), { 'wallets' : [{ 'name' : '' }] })
42+
4143 # check wallet.dat is created
4244 self .stop_nodes ()
4345 assert_equal (os .path .isfile (wallet_dir ('wallet.dat' )), True )
@@ -68,6 +70,8 @@ def wallet_file(name):
6870 wallet_names = ['w1' , 'w2' , 'w3' , 'w' , 'sub/w5' , os .path .join (self .options .tmpdir , 'extern/w6' ), 'w7_symlink' , 'w8' , '' ]
6971 extra_args = ['-wallet={}' .format (n ) for n in wallet_names ]
7072 self .start_node (0 , extra_args )
73+ assert_equal (set (map (lambda w : w ['name' ], self .nodes [0 ].listwalletdir ()['wallets' ])), set (['' , 'w3' , 'w2' , 'sub/w5' , 'w7' , 'w7' , 'w1' , 'w8' , 'w' ]))
74+
7175 assert_equal (set (node .listwallets ()), set (wallet_names ))
7276
7377 # check that all requested wallets were created
@@ -139,6 +143,8 @@ def wallet_file(name):
139143
140144 self .restart_node (0 , extra_args )
141145
146+ assert_equal (set (map (lambda w : w ['name' ], self .nodes [0 ].listwalletdir ()['wallets' ])), set (['' , 'w3' , 'w2' , 'sub/w5' , 'w7' , 'w7' , 'w8_copy' , 'w1' , 'w8' , 'w' ]))
147+
142148 wallets = [wallet (w ) for w in wallet_names ]
143149 wallet_bad = wallet ("bad" )
144150
@@ -276,6 +282,8 @@ def wallet_file(name):
276282 assert_equal (self .nodes [0 ].listwallets (), ['w1' ])
277283 assert_equal (w1 .getwalletinfo ()['walletname' ], 'w1' )
278284
285+ assert_equal (set (map (lambda w : w ['name' ], self .nodes [0 ].listwalletdir ()['wallets' ])), set (['' , 'w3' , 'w2' , 'sub/w5' , 'w7' , 'w9' , 'w7' , 'w8_copy' , 'w1' , 'w8' , 'w' ]))
286+
279287 # Test backing up and restoring wallets
280288 self .log .info ("Test wallet backup" )
281289 self .restart_node (0 , ['-nowallet' ])
0 commit comments