mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-15 16:38:23 +01:00
test: Replace usage of importaddress
This commit is contained in:
@@ -46,10 +46,8 @@ class WalletReindexTest(BitcoinTestFramework):
|
||||
# Blank wallets don't have a birth time
|
||||
assert 'birthtime' not in wallet_watch_only.getwalletinfo()
|
||||
|
||||
# For a descriptors wallet: Import address with timestamp=now.
|
||||
# For legacy wallet: There is no way of importing a script/address with a custom time. The wallet always imports it with birthtime=1.
|
||||
# In both cases, disable rescan to not detect the transaction.
|
||||
wallet_watch_only.importaddress(wallet_addr, rescan=False)
|
||||
# Import address with timestamp=now.
|
||||
wallet_watch_only.importdescriptors([{"desc": miner_wallet.getaddressinfo(wallet_addr)["desc"], "timestamp": "now"}])
|
||||
assert_equal(len(wallet_watch_only.listtransactions()), 0)
|
||||
|
||||
# Depending on the wallet type, the birth time changes.
|
||||
|
||||
Reference in New Issue
Block a user