Broadcast uncle blocks at the same height
To reduce orphan block rate
This commit is contained in:
@@ -1662,6 +1662,10 @@ void SideChain::update_chain_tip(const PoolBlock* block)
|
|||||||
LOGINFO(4, "possible uncle block: id = " << log::Gray() << block->m_sidechainId << log::NoColor() <<
|
LOGINFO(4, "possible uncle block: id = " << log::Gray() << block->m_sidechainId << log::NoColor() <<
|
||||||
", height = " << log::Gray() << block->m_sidechainHeight);
|
", height = " << log::Gray() << block->m_sidechainHeight);
|
||||||
m_pool->update_block_template_async();
|
m_pool->update_block_template_async();
|
||||||
|
// Broadcast it if it's at the same height to give it higher chances to be mined
|
||||||
|
if (block->m_sidechainHeight == tip->m_sidechainHeight) {
|
||||||
|
block->m_wantBroadcast = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p2pServer() && block->m_wantBroadcast && !block->m_broadcasted) {
|
if (p2pServer() && block->m_wantBroadcast && !block->m_broadcasted) {
|
||||||
|
|||||||
Reference in New Issue
Block a user