diff options
author | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2021-11-25 17:30:55 +0100 |
---|---|---|
committer | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2021-11-25 17:31:22 +0100 |
commit | b60e02e993ce9fc3520e1ec5e85423dcefb06f2d (patch) | |
tree | 64322b965c962ceed58d617113149662c4eafb19 | |
parent | a905ed1a61da2fc278f4bc9fa523e81604f61a5e (diff) | |
download | bitcoin-b60e02e993ce9fc3520e1ec5e85423dcefb06f2d.tar.xz |
test: fix test wallet_transactiontime_rescan.py for descriptor wallets
-rwxr-xr-x | test/functional/wallet_transactiontime_rescan.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/functional/wallet_transactiontime_rescan.py b/test/functional/wallet_transactiontime_rescan.py index 0e9c9710ec..21941084a3 100755 --- a/test/functional/wallet_transactiontime_rescan.py +++ b/test/functional/wallet_transactiontime_rescan.py @@ -119,6 +119,14 @@ class TransactionTimeRescanTest(BitcoinTestFramework): restorenode.createwallet(wallet_name='wo', disable_private_keys=True) restorewo_wallet = restorenode.get_wallet_rpc('wo') + # for descriptor wallets, the test framework maps the importaddress RPC to the + # importdescriptors RPC (with argument 'timestamp'='now'), which always rescans + # blocks of the past 2 hours, based on the current MTP timestamp; in order to avoid + # importing the last address (wo3), we advance the time further and generate 10 blocks + if self.options.descriptors: + set_node_times(self.nodes, cur_time + ten_days + ten_days + ten_days + ten_days) + self.generatetoaddress(minernode, 10, m1) + restorewo_wallet.importaddress(wo1, rescan=False) restorewo_wallet.importaddress(wo2, rescan=False) restorewo_wallet.importaddress(wo3, rescan=False) |