aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests/import-rescan.py
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2017-02-03 16:23:13 -0500
committerRussell Yanofsky <russ@yanofsky.org>2017-02-10 15:40:28 -0500
commit442887f27fb5809e72862d4385eba86588bc97d0 (patch)
tree203a8fb48e26aaa644aa5f21c9a3bf92ef886786 /qa/rpc-tests/import-rescan.py
parent02464da5e4aa8c19d4fff3859dcdee822e2af78c (diff)
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
Diffstat (limited to 'qa/rpc-tests/import-rescan.py')
-rwxr-xr-xqa/rpc-tests/import-rescan.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/qa/rpc-tests/import-rescan.py b/qa/rpc-tests/import-rescan.py
index e683df26db..8f60e63e2e 100755
--- a/qa/rpc-tests/import-rescan.py
+++ b/qa/rpc-tests/import-rescan.py
@@ -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,