Prepare compact blob for block broadcasts

Reference transactions by index in the parent block instead of storing full 32 bytes per transaction
This commit is contained in:
SChernykh
2022-11-09 11:17:35 +01:00
parent bbc3d44526
commit c135787620
3 changed files with 41 additions and 5 deletions
+2 -2
View File
@@ -1275,7 +1275,7 @@ void SideChain::verify_loop(PoolBlock* block)
if (block->m_wantBroadcast && !block->m_broadcasted) {
block->m_broadcasted = true;
if (server && (block->m_depth < UNCLE_BLOCK_DEPTH)) {
server->broadcast(*block);
server->broadcast(*block, get_parent(block));
}
}
@@ -1674,7 +1674,7 @@ void SideChain::update_chain_tip(const PoolBlock* block)
if (p2pServer() && block->m_wantBroadcast && !block->m_broadcasted) {
block->m_broadcasted = true;
p2pServer()->broadcast(*block);
p2pServer()->broadcast(*block, get_parent(block));
}
}