From 442887f27fb5809e72862d4385eba86588bc97d0 Mon Sep 17 00:00:00 2001 From: Russell Yanofsky Date: Fri, 3 Feb 2017 16:23:13 -0500 Subject: 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 --- qa/rpc-tests/import-rescan.py | 1 + 1 file changed, 1 insertion(+) (limited to 'qa/rpc-tests/import-rescan.py') 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, -- cgit v1.2.3