aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2022-07-21 11:36:55 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2022-07-21 12:00:05 +0000
commit600de07bcfecc5e31b52257849fa42589167ee51 (patch)
treec4da80c1720891636999bf2a4c0a3e320b83211f
parentfunctional_tests: silence the cpu power test program (diff)
downloadmonero-600de07bcfecc5e31b52257849fa42589167ee51.tar.xz
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
-rw-r--r--src/wallet/wallet_rpc_server.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp
index 7ec5fc7a1..7a6d39a43 100644
--- a/src/wallet/wallet_rpc_server.cpp
+++ b/src/wallet/wallet_rpc_server.cpp
@@ -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;