You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// range, or if the import result already has an error set, let
1135
1135
// the result stand unmodified. Otherwise replace the result
1136
1136
// with an error message.
1137
-
if (GetImportTimestamp(request, now) - TIMESTAMP_WINDOW >= scannedRange->GetBlockTimeMax() || results.at(i).exists("error")) {
1137
+
if (GetImportTimestamp(request, now) - TIMESTAMP_WINDOW > scanFailed->GetBlockTimeMax() || results.at(i).exists("error")) {
1138
1138
response.push_back(results.at(i));
1139
1139
} else {
1140
1140
UniValue result = UniValue(UniValue::VOBJ);
1141
1141
result.pushKV("success", UniValue(false));
1142
-
result.pushKV("error", JSONRPCError(RPC_MISC_ERROR, strprintf("Failed to rescan before time %d, transactions may be missing.", scannedRange->GetBlockTimeMax())));
1142
+
result.pushKV(
1143
+
"error",
1144
+
JSONRPCError(
1145
+
RPC_MISC_ERROR,
1146
+
strprintf("Rescan failed for key with creation timestamp %d. There was an error reading a "
1147
+
"block from time %d, which is after or within %d seconds of key creation, and "
1148
+
"could contain transactions pertaining to the key. As a result, transactions "
1149
+
"and coins using this key may not appear in the wallet. This error could be "
1150
+
"caused by pruning or data corruption (see bitcoind log for details) and could "
1151
+
"be dealt with by downloading and rescanning the relevant blocks (see -reindex "
BOOST_CHECK_EQUAL(response.write(), strprintf("[{\"success\":false,\"error\":{\"code\":-1,\"message\":\"Failed to rescan before time %d, transactions may be missing.\"}},{\"success\":true}]", newTip->GetBlockTimeMax()));
428
+
BOOST_CHECK_EQUAL(response.write(),
429
+
strprintf("[{\"success\":false,\"error\":{\"code\":-1,\"message\":\"Rescan failed for key with creation "
430
+
"timestamp %d. There was an error reading a block from time %d, which is after or within %d "
431
+
"seconds of key creation, and could contain transactions pertaining to the key. As a result, "
432
+
"transactions and coins using this key may not appear in the wallet. This error could be caused "
433
+
"by pruning or data corruption (see bitcoind log for details) and could be dealt with by "
434
+
"downloading and rescanning the relevant blocks (see -reindex and -rescan "
435
+
"options).\"}},{\"success\":true}]",
436
+
0, oldTip->GetBlockTimeMax(), TIMESTAMP_WINDOW));
428
437
::pwalletMain = backup;
429
438
}
430
-
431
-
// Verify ScanForWalletTransactions does not return null when the scan is
0 commit comments