@@ -38,6 +38,8 @@ def wallet_file(name):
38
38
return wallet_dir (name , "wallet.dat" )
39
39
return wallet_dir (name )
40
40
41
+ assert_equal (self .nodes [0 ].listwalletdir (), { 'wallets' : [{ 'name' : '' }] })
42
+
41
43
# check wallet.dat is created
42
44
self .stop_nodes ()
43
45
assert_equal (os .path .isfile (wallet_dir ('wallet.dat' )), True )
@@ -68,6 +70,8 @@ def wallet_file(name):
68
70
wallet_names = ['w1' , 'w2' , 'w3' , 'w' , 'sub/w5' , os .path .join (self .options .tmpdir , 'extern/w6' ), 'w7_symlink' , 'w8' , '' ]
69
71
extra_args = ['-wallet={}' .format (n ) for n in wallet_names ]
70
72
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
+
71
75
assert_equal (set (node .listwallets ()), set (wallet_names ))
72
76
73
77
# check that all requested wallets were created
@@ -139,6 +143,8 @@ def wallet_file(name):
139
143
140
144
self .restart_node (0 , extra_args )
141
145
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
+
142
148
wallets = [wallet (w ) for w in wallet_names ]
143
149
wallet_bad = wallet ("bad" )
144
150
@@ -276,6 +282,8 @@ def wallet_file(name):
276
282
assert_equal (self .nodes [0 ].listwallets (), ['w1' ])
277
283
assert_equal (w1 .getwalletinfo ()['walletname' ], 'w1' )
278
284
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
+
279
287
# Test backing up and restoring wallets
280
288
self .log .info ("Test wallet backup" )
281
289
self .restart_node (0 , ['-nowallet' ])
0 commit comments