From 192a9852536691c5c8d4f511f0592573be4e43f5 Mon Sep 17 00:00:00 2001 From: Nguyen Ba Tam Date: Mon, 1 Oct 2018 16:56:26 +0700 Subject: [PATCH] add a pair connections with each peer --- eth/peer.go | 2 +- p2p/simulations/http_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eth/peer.go b/eth/peer.go index 73324b90f2..faf1c16a2b 100644 --- a/eth/peer.go +++ b/eth/peer.go @@ -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 { p.knownBlocks.Add(block.Hash()) 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}) } else { return p2p.Send(p.rw, NewBlockMsg, []interface{}{block, td}) diff --git a/p2p/simulations/http_test.go b/p2p/simulations/http_test.go index 677a8fb147..e87550d559 100644 --- a/p2p/simulations/http_test.go +++ b/p2p/simulations/http_test.go @@ -179,7 +179,7 @@ func (t *testService) RunDum(p *p2p.Peer, rw p2p.MsgReadWriter) error { // close the dumReady channel so that other protocols can run close(peer.dumReady) - + // block until the peer is dropped for { _, err := rw.ReadMsg()