@@ -57,18 +57,13 @@ def birthtime_test(self, node, miner_wallet):
57
57
58
58
# Depending on the wallet type, the birth time changes.
59
59
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 )
67
62
68
63
# Rescan the wallet to detect the missing transaction
69
64
wallet_watch_only .rescanblockchain ()
70
65
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 )
72
67
73
68
# Reindex and wait for it to finish
74
69
with node .assert_debug_log (expected_msgs = ["initload thread exit" ]):
@@ -81,12 +76,8 @@ def birthtime_test(self, node, miner_wallet):
81
76
assert_equal (tx_info ['confirmations' ], 50 )
82
77
83
78
# 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' ])
90
81
91
82
wallet_watch_only .unloadwallet ()
92
83
0 commit comments