mirror of
https://github.com/SChernykh/p2pool.git
synced 2025-04-16 18:41:54 +00:00
Fix: update peer height on block notify
This commit is contained in:
parent
b92eedeed7
commit
8fc5e5013c
1 changed files with 5 additions and 1 deletions
|
@ -2457,7 +2457,11 @@ void P2PServer::P2PClient::on_block_notify(const uint8_t* buf)
|
|||
P2PServer* server = static_cast<P2PServer*>(m_owner);
|
||||
|
||||
// If we don't know about this block, request it from this peer. The peer can do it to speed up our initial sync, for example.
|
||||
if (!server->find_block(id)) {
|
||||
const PoolBlock* block = server->find_block(id);
|
||||
if (block) {
|
||||
m_broadcastMaxHeight = std::max(m_broadcastMaxHeight, block->m_sidechainHeight);
|
||||
}
|
||||
else {
|
||||
LOGINFO(6, "Received an unknown block " << id << " in BLOCK_NOTIFY");
|
||||
|
||||
if (m_blockPendingRequests.size() >= 25) {
|
||||
|
|
Loading…
Reference in a new issue