Auto merge of #1978 - str4d:1941-scan-whole-chain-on-zkey-import, r=ebfull

Scan the whole chain whenever a z-key is imported

Closes #1941.
This commit is contained in:
zkbot
2017-01-20 00:02:12 +00:00
3 changed files with 110 additions and 0 deletions

View File

@@ -596,6 +596,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);