File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 393
393
'rpc_mempool_info.py' ,
394
394
'rpc_help.py' ,
395
395
'feature_dirsymlinks.py' ,
396
+ 'wallet_abortrescan.py --descriptors' ,
396
397
'feature_help.py' ,
397
398
'feature_shutdown.py' ,
398
399
'wallet_migration.py' ,
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env python3
2
+ # Copyright (c) 2024-present The Bitcoin Core developers
3
+ # Distributed under the MIT software license, see the accompanying
4
+ # file COPYING or http://www.opensource.org/licenses/mit-license.php.
5
+ """Test Abort Wallet Rescan methods."""
6
+ from test_framework .test_framework import BitcoinTestFramework
7
+ from test_framework .util import (
8
+ assert_equal ,
9
+ )
10
+
11
+ class AbortRescanTest (BitcoinTestFramework ):
12
+ def set_test_params (self ):
13
+ self .num_nodes = 1
14
+
15
+ def skip_test_if_missing_module (self ):
16
+ self .skip_if_no_wallet ()
17
+
18
+ def add_options (self , options ):
19
+ self .add_wallet_options (options )
20
+
21
+ def run_test (self ):
22
+ node_0 = self .nodes [0 ]
23
+
24
+ node_0 .createwallet (wallet_name = "w_0" )
25
+ w_0 = self .nodes [0 ].get_wallet_rpc ("w_0" )
26
+
27
+ self .log .info ('Testing abortrescan when no rescan is in progress' )
28
+ assert_equal (w_0 .getwalletinfo ()['scanning' ], False )
29
+ assert_equal (w_0 .abortrescan (), False )
30
+
31
+ # TODO: test abortrescan while rescanning the blockchain
32
+
33
+ if __name__ == '__main__' :
34
+ AbortRescanTest ().main ()
You can’t perform that action at this time.
0 commit comments