mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
p2p:add isInbound infor in log debug
This commit is contained in:
parent
86150af2e5
commit
54795e05e8
1 changed files with 2 additions and 2 deletions
|
|
@ -778,7 +778,7 @@ running:
|
||||||
// The handshakes are done and it passed all checks.
|
// The handshakes are done and it passed all checks.
|
||||||
p := srv.launchPeer(c)
|
p := srv.launchPeer(c)
|
||||||
peers[c.node.ID()] = p
|
peers[c.node.ID()] = p
|
||||||
srv.log.Debug("Adding p2p peer", "peercount", len(peers), "id", p.ID(), "conn", c.flags, "addr", p.RemoteAddr(), "name", p.Name())
|
srv.log.Debug("Adding p2p peer", "peercount", len(peers), "id", p.ID(), "conn", c.flags, "addr", p.RemoteAddr(), "name", p.Name(), "isInbound", p.Inbound())
|
||||||
srv.dialsched.peerAdded(c)
|
srv.dialsched.peerAdded(c)
|
||||||
if p.Inbound() {
|
if p.Inbound() {
|
||||||
inboundCount++
|
inboundCount++
|
||||||
|
|
@ -796,7 +796,7 @@ running:
|
||||||
// A peer disconnected.
|
// A peer disconnected.
|
||||||
d := common.PrettyDuration(mclock.Now() - pd.created)
|
d := common.PrettyDuration(mclock.Now() - pd.created)
|
||||||
delete(peers, pd.ID())
|
delete(peers, pd.ID())
|
||||||
srv.log.Debug("Removing p2p peer", "peercount", len(peers), "id", pd.ID(), "duration", d, "req", pd.requested, "err", pd.err)
|
srv.log.Debug("Removing p2p peer", "peercount", len(peers), "id", pd.ID(), "duration", d, "req", pd.requested, "err", pd.err, "isInbound", pd.Inbound())
|
||||||
srv.dialsched.peerRemoved(pd.rw)
|
srv.dialsched.peerRemoved(pd.rw)
|
||||||
if pd.Inbound() {
|
if pd.Inbound() {
|
||||||
inboundCount--
|
inboundCount--
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue