Add nodejs pool extra nonce support

This commit is contained in:
Codex Bot
2026-05-02 23:33:23 +02:00
parent a4134bde72
commit f29afbb2a5
7 changed files with 216 additions and 46 deletions
+7 -3
View File
@@ -28,6 +28,10 @@ LOG_CATEGORY(MergeMiningClientJSON_RPC)
namespace p2pool {
namespace {
static constexpr int MERGE_MINING_RPC_TIMEOUT_SECONDS = 30;
}
MergeMiningClientJSON_RPC::MergeMiningClientJSON_RPC(p2pool* pool, const std::string& host, const std::string& wallet)
: MergeMiningClientShared(pool, wallet)
, m_host(host)
@@ -135,7 +139,7 @@ void MergeMiningClientJSON_RPC::merge_mining_get_chain_id()
if (size > 0) {
LOGERR(1, "couldn't get merge mining id from " << m_host << ':' << m_port << ", error " << log::const_buf(data, size));
}
}, &m_loop);
}, &m_loop, MERGE_MINING_RPC_TIMEOUT_SECONDS);
}
bool MergeMiningClientJSON_RPC::parse_merge_mining_get_chain_id(const char* data, size_t size)
@@ -237,7 +241,7 @@ void MergeMiningClientJSON_RPC::merge_mining_get_aux_block(uint64_t height, cons
LOGERR(3, "couldn't get merge mining job from " << m_host << ':' << m_port << ", error " << log::const_buf(data, size));
}
m_getJobRunning = false;
}, &m_loop);
}, &m_loop, MERGE_MINING_RPC_TIMEOUT_SECONDS);
}
bool MergeMiningClientJSON_RPC::parse_merge_mining_get_aux_block(const char* data, size_t size, bool& changed)
@@ -343,7 +347,7 @@ void MergeMiningClientJSON_RPC::submit_solution(const std::vector<uint8_t>& /*co
}
// Get new mining job
on_timer();
}, &m_loop);
}, &m_loop, MERGE_MINING_RPC_TIMEOUT_SECONDS);
}
void MergeMiningClientJSON_RPC::print_status() const