Skip to content

Commit 20a9173

Browse files
committed
test: Remove legacy wallet tests from wallet_reindex.py
1 parent 446d480 commit 20a9173

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

test/functional/test_runner.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,7 @@
216216
'wallet_createwallet.py --descriptors',
217217
'wallet_watchonly.py --legacy-wallet',
218218
'wallet_watchonly.py --usecli --legacy-wallet',
219-
'wallet_reindex.py --legacy-wallet',
220-
'wallet_reindex.py --descriptors',
219+
'wallet_reindex.py',
221220
'wallet_reorgsrestore.py',
222221
'interface_http.py',
223222
'interface_rpc.py',

test/functional/wallet_reindex.py

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,13 @@ def birthtime_test(self, node, miner_wallet):
5757

5858
# Depending on the wallet type, the birth time changes.
5959
wallet_birthtime = wallet_watch_only.getwalletinfo()['birthtime']
60-
if self.options.descriptors:
61-
# As blocks were generated every 10 min, the chain MTP timestamp is node_time - 60 min.
62-
assert_equal(self.node_time - BLOCK_TIME * 6, wallet_birthtime)
63-
else:
64-
# No way of importing scripts/addresses with a custom time on a legacy wallet.
65-
# It's always set to the beginning of time.
66-
assert_equal(wallet_birthtime, 1)
60+
# As blocks were generated every 10 min, the chain MTP timestamp is node_time - 60 min.
61+
assert_equal(self.node_time - BLOCK_TIME * 6, wallet_birthtime)
6762

6863
# Rescan the wallet to detect the missing transaction
6964
wallet_watch_only.rescanblockchain()
7065
assert_equal(wallet_watch_only.gettransaction(tx_id)['confirmations'], 50)
71-
assert_equal(wallet_watch_only.getbalances()['mine' if self.options.descriptors else 'watchonly']['trusted'], 2)
66+
assert_equal(wallet_watch_only.getbalances()['mine']['trusted'], 2)
7267

7368
# Reindex and wait for it to finish
7469
with node.assert_debug_log(expected_msgs=["initload thread exit"]):
@@ -81,12 +76,8 @@ def birthtime_test(self, node, miner_wallet):
8176
assert_equal(tx_info['confirmations'], 50)
8277

8378
# Depending on the wallet type, the birth time changes.
84-
if self.options.descriptors:
85-
# For descriptors, verify the wallet updated the birth time to the transaction time
86-
assert_equal(tx_info['time'], wallet_watch_only.getwalletinfo()['birthtime'])
87-
else:
88-
# For legacy, as the birth time was set to the beginning of time, verify it did not change
89-
assert_equal(wallet_birthtime, 1)
79+
# For descriptors, verify the wallet updated the birth time to the transaction time
80+
assert_equal(tx_info['time'], wallet_watch_only.getwalletinfo()['birthtime'])
9081

9182
wallet_watch_only.unloadwallet()
9283

0 commit comments

Comments
 (0)