File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -874,6 +874,25 @@ def run_test(self):
874
874
addr = wrpc .getnewaddress ('' , 'bech32' )
875
875
assert_equal (addr , addresses [i ])
876
876
877
+ # Create wallet with passphrase
878
+ self .log .info ('Test watchonly imports on a wallet with a passphrase, without unlocking' )
879
+ self .nodes [1 ].createwallet (wallet_name = 'w1' , blank = True , passphrase = 'pass' )
880
+ wrpc = self .nodes [1 ].get_wallet_rpc ('w1' )
881
+ assert_raises_rpc_error (- 13 , "Please enter the wallet passphrase with walletpassphrase first." ,
882
+ wrpc .importmulti , [{
883
+ 'desc' : descsum_create ('wpkh(' + pub1 + ')' ),
884
+ "timestamp" : "now" ,
885
+ }])
886
+
887
+ result = wrpc .importmulti (
888
+ [{
889
+ 'desc' : descsum_create ('wpkh(' + pub1 + ')' ),
890
+ "timestamp" : "now" ,
891
+ "watchonly" : True ,
892
+ }]
893
+ )
894
+ assert result [0 ]['success' ]
895
+
877
896
878
897
if __name__ == '__main__' :
879
898
ImportMultiTest ().main ()
You can’t perform that action at this time.
0 commit comments