Skip to content

Commit fa15854

Browse files
committed
logger: add P2P disconnected event
1 parent dd871e7 commit fa15854

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

logger/types.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,16 @@ func (l *P2PConnected) EventName() string {
4242
return "p2p.connected"
4343
}
4444

45+
type P2PDisconnected struct {
46+
NumConnections int `json:"num_connections"`
47+
RemoteId string `json:"remote_id"`
48+
LogEvent
49+
}
50+
51+
func (l *P2PDisconnected) EventName() string {
52+
return "p2p.disconnected"
53+
}
54+
4555
type EthMinerNewBlock struct {
4656
BlockHash string `json:"block_hash"`
4757
BlockNumber int `json:"block_number"`
@@ -117,16 +127,6 @@ func (l *EthTxReceived) EventName() string {
117127
// return "p2p.handshaked"
118128
// }
119129

120-
// type P2PDisconnected struct {
121-
// NumConnections int `json:"num_connections"`
122-
// RemoteId string `json:"remote_id"`
123-
// LogEvent
124-
// }
125-
126-
// func (l *P2PDisconnected) EventName() string {
127-
// return "p2p.disconnected"
128-
// }
129-
130130
// type P2PDisconnecting struct {
131131
// Reason string `json:"reason"`
132132
// RemoteId string `json:"remote_id"`

0 commit comments

Comments
 (0)