mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 04:47:18 +00:00
Fix Nil Pointer in RPC List Peers (#7612)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
parent
4a78071e41
commit
ff15621fe1
@ -189,8 +189,11 @@ func (ns *Server) ListPeers(ctx context.Context, _ *ptypes.Empty) (*ethpb.Peers,
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
address := fmt.Sprintf("%s/p2p/%s", multiaddr.String(), pid.Pretty())
|
||||
multiAddrStr := "unknown"
|
||||
if multiaddr != nil {
|
||||
multiAddrStr = multiaddr.String()
|
||||
}
|
||||
address := fmt.Sprintf("%s/p2p/%s", multiAddrStr, pid.Pretty())
|
||||
pbDirection := ethpb.PeerDirection_UNKNOWN
|
||||
switch direction {
|
||||
case network.DirInbound:
|
||||
|
Loading…
Reference in New Issue
Block a user