mirror of
https://github.com/monero-project/monero.git
synced 2026-06-12 19:11:36 -07:00
wallet: rescan_blockchain missing keep_key_images
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user