diff options
author | Péter Szilágyi <peterke@gmail.com> | 2015-05-20 15:34:45 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2015-05-20 15:34:45 +0800 |
commit | 3c8227b935fdc9eda7a6cfacc2e0d0d189e7bb36 (patch) | |
tree | f5c78da61ce00c637b6f05932162a645ba8581d1 /eth/handler.go | |
parent | 79042223dc5f2ae5d4a2ed73d18907440a963093 (diff) | |
download | go-tangerine-3c8227b935fdc9eda7a6cfacc2e0d0d189e7bb36.tar go-tangerine-3c8227b935fdc9eda7a6cfacc2e0d0d189e7bb36.tar.gz go-tangerine-3c8227b935fdc9eda7a6cfacc2e0d0d189e7bb36.tar.bz2 go-tangerine-3c8227b935fdc9eda7a6cfacc2e0d0d189e7bb36.tar.lz go-tangerine-3c8227b935fdc9eda7a6cfacc2e0d0d189e7bb36.tar.xz go-tangerine-3c8227b935fdc9eda7a6cfacc2e0d0d189e7bb36.tar.zst go-tangerine-3c8227b935fdc9eda7a6cfacc2e0d0d189e7bb36.zip |
eth: fix odd method names in peer set
Diffstat (limited to 'eth/handler.go')
-rw-r--r-- | eth/handler.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/eth/handler.go b/eth/handler.go index 835097d84..8dd254b1a 100644 --- a/eth/handler.go +++ b/eth/handler.go @@ -350,7 +350,7 @@ func (pm *ProtocolManager) verifyTd(peer *peer, request newBlockMsgData) error { // sqrt(peers) to determine the amount of peers we broadcast to. func (pm *ProtocolManager) BroadcastBlock(hash common.Hash, block *types.Block) { // Broadcast block to a batch of peers not knowing about it - peers := pm.peers.BlockLackingPeers(hash) + peers := pm.peers.PeersWithoutBlock(hash) peers = peers[:int(math.Sqrt(float64(len(peers))))] for _, peer := range peers { peer.sendNewBlock(block) @@ -363,7 +363,7 @@ func (pm *ProtocolManager) BroadcastBlock(hash common.Hash, block *types.Block) // sqrt(peers) to determine the amount of peers we broadcast to. func (pm *ProtocolManager) BroadcastTx(hash common.Hash, tx *types.Transaction) { // Broadcast transaction to a batch of peers not knowing about it - peers := pm.peers.TxLackingPeers(hash) + peers := pm.peers.PeersWithoutTx(hash) //FIXME include this again: peers = peers[:int(math.Sqrt(float64(len(peers))))] for _, peer := range peers { peer.sendTransaction(tx) |