result.pushKV("error",JSONRPCError(RPC_MISC_ERROR,strprintf("Failed to rescan before time %d, transactions may be missing.",scannedRange->GetBlockTimeMax())));
BOOST_CHECK_EQUAL(response.write(),strprintf("[{\"success\":false,\"error\":{\"code\":-1,\"message\":\"Failed to rescan before time %d, transactions may be missing.\"}}]",newTip->GetBlockTimeMax()));
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()));