|
|
@ -497,7 +497,7 @@ UniValue importwallet(const JSONRPCRequest& request) |
|
|
|
pwalletMain->ShowProgress("", 100); // hide progress dialog in GUI
|
|
|
|
pwalletMain->ShowProgress("", 100); // hide progress dialog in GUI
|
|
|
|
|
|
|
|
|
|
|
|
CBlockIndex *pindex = chainActive.Tip(); |
|
|
|
CBlockIndex *pindex = chainActive.Tip(); |
|
|
|
while (pindex && pindex->pprev && pindex->GetBlockTime() > nTimeBegin - 7200) |
|
|
|
while (pindex && pindex->pprev && pindex->GetBlockTime() > nTimeBegin - TIMESTAMP_WINDOW) |
|
|
|
pindex = pindex->pprev; |
|
|
|
pindex = pindex->pprev; |
|
|
|
|
|
|
|
|
|
|
|
pwalletMain->UpdateTimeFirstKey(nTimeBegin); |
|
|
|
pwalletMain->UpdateTimeFirstKey(nTimeBegin); |
|
|
@ -1073,7 +1073,7 @@ UniValue importmulti(const JSONRPCRequest& mainRequest) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (fRescan && fRunScan && requests.size()) { |
|
|
|
if (fRescan && fRunScan && requests.size()) { |
|
|
|
CBlockIndex* pindex = nLowestTimestamp > minimumTimestamp ? chainActive.FindEarliestAtLeast(std::max<int64_t>(nLowestTimestamp - 7200, 0)) : chainActive.Genesis(); |
|
|
|
CBlockIndex* pindex = nLowestTimestamp > minimumTimestamp ? chainActive.FindEarliestAtLeast(std::max<int64_t>(nLowestTimestamp - TIMESTAMP_WINDOW, 0)) : chainActive.Genesis(); |
|
|
|
CBlockIndex* scannedRange = nullptr; |
|
|
|
CBlockIndex* scannedRange = nullptr; |
|
|
|
if (pindex) { |
|
|
|
if (pindex) { |
|
|
|
scannedRange = pwalletMain->ScanForWalletTransactions(pindex, true); |
|
|
|
scannedRange = pwalletMain->ScanForWalletTransactions(pindex, true); |
|
|
@ -1090,7 +1090,7 @@ UniValue importmulti(const JSONRPCRequest& mainRequest) |
|
|
|
// range, or if the import result already has an error set, let
|
|
|
|
// range, or if the import result already has an error set, let
|
|
|
|
// the result stand unmodified. Otherwise replace the result
|
|
|
|
// the result stand unmodified. Otherwise replace the result
|
|
|
|
// with an error message.
|
|
|
|
// with an error message.
|
|
|
|
if (GetImportTimestamp(request, now) - 7200 >= scannedRange->GetBlockTimeMax() || results.at(i).exists("error")) { |
|
|
|
if (GetImportTimestamp(request, now) - TIMESTAMP_WINDOW >= scannedRange->GetBlockTimeMax() || results.at(i).exists("error")) { |
|
|
|
response.push_back(results.at(i)); |
|
|
|
response.push_back(results.at(i)); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
UniValue result = UniValue(UniValue::VOBJ); |
|
|
|
UniValue result = UniValue(UniValue::VOBJ); |
|
|
|