mirror of
https://github.com/SChernykh/p2pool.git
synced 2024-12-23 03:49:23 +00:00
Sync test: log more data in the end
This commit is contained in:
parent
d4180a5084
commit
9283677a2b
2 changed files with 11 additions and 5 deletions
|
@ -2183,9 +2183,12 @@ bool P2PServer::P2PClient::handle_incoming_block_async(const PoolBlock* block, u
|
||||||
// Limit system clock difference between connected peers
|
// Limit system clock difference between connected peers
|
||||||
// Check only new blocks (not added to side_chain yet)
|
// Check only new blocks (not added to side_chain yet)
|
||||||
if (max_time_delta && !side_chain.find_block(block->m_sidechainId)) {
|
if (max_time_delta && !side_chain.find_block(block->m_sidechainId)) {
|
||||||
static hash prev_checked_block;
|
static hash prev_checked_blocks[2];
|
||||||
const bool is_new = (block->m_sidechainId != prev_checked_block);
|
const bool is_new = (block->m_sidechainId != prev_checked_blocks[0]) && (block->m_sidechainId != prev_checked_blocks[1]);
|
||||||
prev_checked_block = block->m_sidechainId;
|
if (is_new) {
|
||||||
|
prev_checked_blocks[1] = prev_checked_blocks[0];
|
||||||
|
prev_checked_blocks[0] = block->m_sidechainId;
|
||||||
|
}
|
||||||
|
|
||||||
const uint64_t t = time(nullptr);
|
const uint64_t t = time(nullptr);
|
||||||
const uint32_t failed = ((block->m_timestamp + max_time_delta < t) || (block->m_timestamp > t + max_time_delta)) ? 1 : 0;
|
const uint32_t failed = ((block->m_timestamp + max_time_delta < t) || (block->m_timestamp > t + max_time_delta)) ? 1 : 0;
|
||||||
|
|
|
@ -2156,8 +2156,11 @@ void SideChain::finish_precalc()
|
||||||
if (m_pool) {
|
if (m_pool) {
|
||||||
LOGINFO(0, log::LightGreen() << "[DEV] Synchronization finished successfully, stopping P2Pool now");
|
LOGINFO(0, log::LightGreen() << "[DEV] Synchronization finished successfully, stopping P2Pool now");
|
||||||
print_status(false);
|
print_status(false);
|
||||||
if (m_pool->p2p_server()) {
|
P2PServer* server = m_pool->p2p_server();
|
||||||
m_pool->p2p_server()->print_status();
|
if (server) {
|
||||||
|
server->print_status();
|
||||||
|
server->print_bans();
|
||||||
|
server->show_peers_async();
|
||||||
}
|
}
|
||||||
m_pool->stop();
|
m_pool->stop();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue