mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-16 09:50:45 +00:00
add a pair connections with each peer
This commit is contained in:
parent
8e1ffd7c72
commit
076cc560e5
1 changed files with 1 additions and 1 deletions
|
|
@ -168,7 +168,7 @@ func (p *peer) SendNewBlockHashes(hashes []common.Hash, numbers []uint64) error
|
||||||
func (p *peer) SendNewBlock(block *types.Block, td *big.Int) error {
|
func (p *peer) SendNewBlock(block *types.Block, td *big.Int) error {
|
||||||
p.knownBlocks.Add(block.Hash())
|
p.knownBlocks.Add(block.Hash())
|
||||||
if p.pairRw != nil {
|
if p.pairRw != nil {
|
||||||
log.Trace("p2p Send New Block with pairRw", "p", p, "number", block.NumberU64())
|
log.Trace("p2p send new block to the pairRw connection", "p", p, "number", block.NumberU64())
|
||||||
return p2p.Send(p.pairRw, NewBlockMsg, []interface{}{block, td})
|
return p2p.Send(p.pairRw, NewBlockMsg, []interface{}{block, td})
|
||||||
} else {
|
} else {
|
||||||
return p2p.Send(p.rw, NewBlockMsg, []interface{}{block, td})
|
return p2p.Send(p.rw, NewBlockMsg, []interface{}{block, td})
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue