mirror of
https://github.com/SChernykh/p2pool.git
synced 2025-03-12 09:29:51 +00:00
P2PServer: check broadcasts for wrong height
This commit is contained in:
parent
da0f376bef
commit
42dd58d778
1 changed files with 5 additions and 0 deletions
|
@ -501,6 +501,11 @@ void P2PServer::broadcast(const PoolBlock& block)
|
|||
return;
|
||||
}
|
||||
|
||||
if (block.m_txinGenHeight > m_pool->miner_data().height + 2) {
|
||||
LOGWARN(4, "Trying to broadcast a block " << block.m_sidechainId << " ahead on mainchain (mainchain height " << block.m_txinGenHeight << ", current height is " << m_pool->miner_data().height << ')');
|
||||
return;
|
||||
}
|
||||
|
||||
Broadcast* data = new Broadcast();
|
||||
|
||||
data->blob.reserve(block.m_mainChainData.size() + block.m_sideChainData.size());
|
||||
|
|
Loading…
Reference in a new issue