wallet_rpc_server: add missing trusted daemon check

This commit is contained in:
selsta
2026-05-07 22:55:39 +02:00
parent 4a24ca3ad6
commit dae0f4cf61
+6
View File
@@ -3464,6 +3464,12 @@ namespace tools
bool wallet_rpc_server::on_rescan_spent(const wallet_rpc::COMMAND_RPC_RESCAN_SPENT::request& req, wallet_rpc::COMMAND_RPC_RESCAN_SPENT::response& res, epee::json_rpc::error& er, const connection_context *ctx)
{
CHECK_IF_RESTRICTED_BACKGROUND_SYNCING();
if (!m_wallet->is_trusted_daemon())
{
er.code = WALLET_RPC_ERROR_CODE_UNKNOWN_ERROR;
er.message = "This command requires a trusted daemon.";
return false;
}
try
{
m_wallet->rescan_spent();