Fixed cppcheck errors

pull/286/head
SChernykh 2023-10-08 23:33:06 +02:00
parent 7a65e1feb5
commit e5770a5343
3 changed files with 8 additions and 3 deletions

View File

@ -319,6 +319,7 @@ static void do_exit(p2pool *m_pool, const char * /* args */)
m_pool->stop();
}
// cppcheck-suppress constParameterCallback
static void do_version(p2pool* m_pool, const char* /* args */)
{
LOGINFO(0, log::LightCyan() << VERSION);

View File

@ -1258,7 +1258,13 @@ void P2PServer::check_block_template()
void P2PServer::check_for_updates(bool forced) const
{
if (!forced && (m_timerCounter % (3600 / m_timerInterval) != 0)) {
#ifdef DEV_TEST_SYNC
constexpr uint64_t check_interval = 60;
#else
constexpr uint64_t check_interval = 3600;
#endif
if (!forced && (m_timerCounter % (check_interval / m_timerInterval) != 0)) {
return;
}

View File

@ -2160,8 +2160,6 @@ void SideChain::prune_old_blocks()
server1->show_workers_async();
server2->show_peers_async();
server2->check_for_updates(true);
}
m_pool->print_hosts();