Merge pull request #10309

adeaa69 wallet: rescan_blockchain missing keep_key_images (Navid Rahimi)
This commit is contained in:
tobtoht
2026-06-05 11:04:47 +00:00
2 changed files with 9 additions and 1 deletions
+7 -1
View File
@@ -2360,10 +2360,16 @@ namespace tools
bool wallet_rpc_server::on_rescan_blockchain(const wallet_rpc::COMMAND_RPC_RESCAN_BLOCKCHAIN::request& req, wallet_rpc::COMMAND_RPC_RESCAN_BLOCKCHAIN::response& res, epee::json_rpc::error& er, const connection_context *ctx)
{
CHECK_IF_RESTRICTED_BACKGROUND_SYNCING();
if (req.hard && req.keep_key_images)
{
er.code = WALLET_RPC_ERROR_CODE_UNKNOWN_ERROR;
er.message = "Cannot preserve key images on hard rescan";
return false;
}
try
{
m_wallet->rescan_blockchain(req.hard);
m_wallet->rescan_blockchain(req.hard, true, req.keep_key_images);
}
catch (const std::exception& e)
{
@@ -1220,9 +1220,11 @@ namespace wallet_rpc
struct request_t
{
bool hard;
bool keep_key_images;
BEGIN_KV_SERIALIZE_MAP()
KV_SERIALIZE_OPT(hard, false)
KV_SERIALIZE_OPT(keep_key_images, false)
END_KV_SERIALIZE_MAP()
};
typedef epee::misc_utils::struct_init<request_t> request;