mirror of
https://github.com/wownero/wownero.git
synced 2026-10-17 07:31:35 +02:00
wallet_rpc_server: add missing trusted daemon check
(cherry picked from commit 7e70e0fb9359507bc1cd7e75eb73d82a9001d005)
This commit is contained in:
@@ -3452,6 +3452,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();
|
||||
|
||||
Reference in New Issue
Block a user