Skip to content

Commit

Permalink
remove nils from p2p logs (#10303)
Browse files Browse the repository at this point in the history
fix for 
```
[p2p] Server                             protocol=68 peers=2 trusted=0 inbound=1 LOG15_ERROR= LOG15_ERROR= LOG15_ERROR= LOG15_ERROR= LOG15_ERROR= i/o timeout=53 EOF=65 closed by remote=215 too many peers=6 ecies: invalid message=5
```
  • Loading branch information
AskAlexSharov authored and yperbasis committed May 14, 2024
1 parent 9ded704 commit 86f52c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion p2p/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1221,7 +1221,7 @@ func (srv *Server) listErrors() []interface{} {
srv.errorsMu.Lock()
defer srv.errorsMu.Unlock()

list := make([]interface{}, len(srv.errors)*2)
list := make([]interface{}, 0, len(srv.errors)*2)
for err, count := range srv.errors {
list = append(list, err, count)
}
Expand Down

0 comments on commit 86f52c7

Please sign in to comment.