mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Require timestamps for importmulti keys
Additionally, accept a "now" timestamp, to allow avoiding rescans for keys which are known never to have been used. Note that the behavior when "now" is specified is slightly different than the previous behavior when no timestamp was specified at all. Previously, when no timestamp was specified, it would avoid rescanning during the importmulti call, but set the key's nCreateTime value to 1, which would not prevent future block reads in later ScanForWalletTransactions calls. With this change, passing a "now" timestamp will set the key's nCreateTime to the current block time instead of 1. Fixes #9491
This commit is contained in:
@@ -33,6 +33,7 @@ def call_import_rpc(call, data, address, scriptPubKey, pubkey, key, label, node,
|
||||
"scriptPubKey": {
|
||||
"address": address
|
||||
},
|
||||
"timestamp": "now",
|
||||
"pubkeys": [pubkey] if data == Data.pub else [],
|
||||
"keys": [key] if data == Data.priv else [],
|
||||
"label": label,
|
||||
|
||||
Reference in New Issue
Block a user