mirror of
https://github.com/monero-project/monero.git
synced 2024-12-25 05:19:23 -05:00
wallet_rpc_server: longer timeout for stop_mining
That RPC will wait for mining to actually stop, which can be a while if randomx has just started on randomx_init_dataset. This fixes occasional failures in the mining functional test
This commit is contained in:
parent
ac6db928c2
commit
600de07bcf
@ -3254,7 +3254,7 @@ namespace tools
|
||||
if (!m_wallet) return not_open(er);
|
||||
cryptonote::COMMAND_RPC_STOP_MINING::request daemon_req;
|
||||
cryptonote::COMMAND_RPC_STOP_MINING::response daemon_res;
|
||||
bool r = m_wallet->invoke_http_json("/stop_mining", daemon_req, daemon_res);
|
||||
bool r = m_wallet->invoke_http_json("/stop_mining", daemon_req, daemon_res, std::chrono::seconds(60)); // this waits till stopped, and if randomx has just started initializing its dataset, it might be a while
|
||||
if (!r || daemon_res.status != CORE_RPC_STATUS_OK)
|
||||
{
|
||||
er.code = WALLET_RPC_ERROR_CODE_UNKNOWN_ERROR;
|
||||
|
Loading…
Reference in New Issue
Block a user