Skip to content

Commit aaaf65a

Browse files
committed
fixup! Return errors from importmulti if complete rescans are not successful
Avoid PRId64 as requested #9773 (comment)
1 parent 90671ee commit aaaf65a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/wallet/rpcdump.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1095,7 +1095,7 @@ UniValue importmulti(const JSONRPCRequest& mainRequest)
10951095
} else {
10961096
UniValue result = UniValue(UniValue::VOBJ);
10971097
result.pushKV("success", UniValue(false));
1098-
result.pushKV("error", JSONRPCError(RPC_MISC_ERROR, strprintf("Failed to rescan before time %" PRId64 ", transactions may be missing.", scannedRange->GetBlockTimeMax())));
1098+
result.pushKV("error", JSONRPCError(RPC_MISC_ERROR, strprintf("Failed to rescan before time %d, transactions may be missing.", scannedRange->GetBlockTimeMax())));
10991099
response.push_back(std::move(result));
11001100
}
11011101
}

src/wallet/test/wallet_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ BOOST_FIXTURE_TEST_CASE(rescan, TestChain100Setup)
411411
request.params.push_back(keys);
412412

413413
UniValue response = importmulti(request);
414-
BOOST_CHECK_EQUAL(response.write(), strprintf("[{\"success\":false,\"error\":{\"code\":-1,\"message\":\"Failed to rescan before time %" PRId64 ", transactions may be missing.\"}}]", newTip->GetBlockTimeMax()));
414+
BOOST_CHECK_EQUAL(response.write(), strprintf("[{\"success\":false,\"error\":{\"code\":-1,\"message\":\"Failed to rescan before time %d, transactions may be missing.\"}}]", newTip->GetBlockTimeMax()));
415415
}
416416
}
417417

0 commit comments

Comments
 (0)