From 7e3a20f235f83650e7792c0da7bedb7bc92ff0fb Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Wed, 4 Jan 2017 15:40:35 +0100 Subject: [PATCH] Scan the whole chain whenever a z-key is imported Closes #1941. --- src/wallet/rpcdump.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wallet/rpcdump.cpp b/src/wallet/rpcdump.cpp index 789bd4537..d5f9a3785 100644 --- a/src/wallet/rpcdump.cpp +++ b/src/wallet/rpcdump.cpp @@ -575,6 +575,9 @@ Value z_importkey(const Array& params, bool fHelp) pwalletMain->mapZKeyMetadata[addr].nCreateTime = 1; + // whenever a key is imported, we need to scan the whole chain + pwalletMain->nTimeFirstKey = 1; // 0 would be considered 'no value' + // We want to scan for transactions and notes if (fRescan) { pwalletMain->ScanForWalletTransactions(chainActive.Genesis(), true);