mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2024-12-23 11:57:17 +00:00
eth: 100% block propogation
This commit is contained in:
parent
a225ef9c13
commit
e5d7627427
@ -2,7 +2,6 @@ package eth
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math"
|
||||
"math/big"
|
||||
"sync"
|
||||
"time"
|
||||
@ -359,7 +358,7 @@ func (pm *ProtocolManager) verifyTd(peer *peer, request newBlockMsgData) error {
|
||||
func (pm *ProtocolManager) BroadcastBlock(hash common.Hash, block *types.Block) {
|
||||
// Broadcast block to a batch of peers not knowing about it
|
||||
peers := pm.peers.PeersWithoutBlock(hash)
|
||||
peers = peers[:int(math.Sqrt(float64(len(peers))))]
|
||||
//peers = peers[:int(math.Sqrt(float64(len(peers))))]
|
||||
for _, peer := range peers {
|
||||
peer.sendNewBlock(block)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user