Notify about new P2Pool versions
This commit is contained in:
@@ -1081,6 +1081,7 @@ void P2PServer::on_timer()
|
||||
update_peer_connections();
|
||||
check_host();
|
||||
check_block_template();
|
||||
check_for_updates();
|
||||
api_update_local_stats();
|
||||
}
|
||||
|
||||
@@ -1255,6 +1256,21 @@ void P2PServer::check_block_template()
|
||||
}
|
||||
}
|
||||
|
||||
void P2PServer::check_for_updates() const
|
||||
{
|
||||
if (m_timerCounter % (3600 / m_timerInterval) != 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
const SideChain& s = m_pool->side_chain();
|
||||
|
||||
if (s.precalcFinished() && s.p2pool_update_available()) {
|
||||
LOGINFO(0, log::LightCyan() << "********************************************************************************");
|
||||
LOGINFO(0, log::LightCyan() << "* An updated P2Pool version is available, visit p2pool.io for more information *");
|
||||
LOGINFO(0, log::LightCyan() << "********************************************************************************");
|
||||
}
|
||||
}
|
||||
|
||||
P2PServer::P2PClient::P2PClient()
|
||||
: Client(m_p2pReadBuf, sizeof(m_p2pReadBuf))
|
||||
, m_peerId(0)
|
||||
|
||||
Reference in New Issue
Block a user