Skip to content

Commit

Permalink
Fixed cppcheck errors
Browse files Browse the repository at this point in the history
  • Loading branch information
SChernykh committed Oct 8, 2023
1 parent 7a65e1f commit e5770a5
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/console_commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 7 additions & 1 deletion src/p2p_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
2 changes: 0 additions & 2 deletions src/side_chain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit e5770a5

Please sign in to comment.