mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 03:30:37 +00:00
Fix for peer not found messages (#2181)
* Fix for peer not found messages * Print proto on disconnects too Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
This commit is contained in:
parent
1390b3c740
commit
8a166204b4
@ -250,13 +250,13 @@ func runPeer(
|
||||
peerPrinted := false
|
||||
defer func() {
|
||||
if peerPrinted {
|
||||
log.Info(fmt.Sprintf("Peer %s [%s] disconnected", peerID, peerInfo.peer.Fullname()))
|
||||
log.Info(fmt.Sprintf("Peer %s [%s] disconnected", peerID, peerInfo.peer.Fullname()), "proto", protocol)
|
||||
}
|
||||
}()
|
||||
for {
|
||||
if !peerPrinted {
|
||||
if time.Now().After(printTime) {
|
||||
log.Info(fmt.Sprintf("Peer %s [%s] stable", peerID, peerInfo.peer.Fullname()))
|
||||
log.Info(fmt.Sprintf("Peer %s [%s] stable", peerID, peerInfo.peer.Fullname()), "proto", protocol)
|
||||
peerPrinted = true
|
||||
}
|
||||
}
|
||||
@ -501,6 +501,7 @@ func NewSentryServer(ctx context.Context, dialCandidates enode.Iterator, readNod
|
||||
if err != nil {
|
||||
return fmt.Errorf("handshake to peer %s: %v", peerID, err)
|
||||
}
|
||||
ss.Peers.Store(peerID, peerInfo) // TODO: This means potentially setting this twice, first time few lines above
|
||||
log.Debug(fmt.Sprintf("[%s] Received status message OK", peerID), "name", peer.Name())
|
||||
|
||||
if err := runPeer(
|
||||
|
Loading…
Reference in New Issue
Block a user