This repository was archived by the owner on Apr 24, 2022. It is now read-only.
File tree 1 file changed +7
-13
lines changed
1 file changed +7
-13
lines changed Original file line number Diff line number Diff line change @@ -247,10 +247,11 @@ void PoolManager::stop()
247
247
DEV_BUILD_LOG_PROGRAMFLOW (cnote, " PoolManager::stop() end" );
248
248
}
249
249
250
- void PoolManager::addConnection (URI& conn )
250
+ void PoolManager::addConnection (URI& _conn )
251
251
{
252
- Guard l (m_activeConnectionMutex);
253
- m_connections.push_back (conn);
252
+ // Guard l(m_activeConnectionMutex);
253
+ string con = _conn.str ();
254
+ m_connections.push_back (URI (con));
254
255
}
255
256
256
257
/*
@@ -483,17 +484,10 @@ void PoolManager::submithrtimer_elapsed(const boost::system::error_code& ec)
483
484
{
484
485
if (m_running.load (std::memory_order_relaxed))
485
486
{
487
+ std::string hr_hex = toHex ((uint64_t )Farm::f ().HashRate (), HexPrefix::Add);
488
+
486
489
if (p_client && p_client->isConnected ())
487
- {
488
- std::string h = toHex (toCompactBigEndian (uint64_t (Farm::f ().HashRate ()), 1 ));
489
- std::string res = h[0 ] != ' 0' ? h : h.substr (1 );
490
-
491
- // Should be 32 bytes
492
- // https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_submithashrate
493
- std::ostringstream ss;
494
- ss << " 0x" << std::setw (64 ) << std::setfill (' 0' ) << res;
495
- p_client->submitHashrate (ss.str (), m_hashrateId);
496
- }
490
+ p_client->submitHashrate (hr_hex, m_hashrateId);
497
491
498
492
// Resubmit actor
499
493
m_submithrtimer.expires_from_now (boost::posix_time::seconds (m_hrReportingInterval));
You can’t perform that action at this time.
0 commit comments