mirror of
https://github.com/logos-messaging/logos-messaging-go.git
synced 2026-01-05 15:33:11 +00:00
bug_: add more nil checking
This commit is contained in:
parent
d1cb6b0eaa
commit
03308b3b62
@ -432,7 +432,7 @@ func (pm *PeerManager) AddDiscoveredPeer(p service.PeerData, connectNow bool) {
|
||||
enr, err := pm.host.Peerstore().(wps.WakuPeerstore).ENR(p.AddrInfo.ID)
|
||||
// Verifying if the enr record is more recent (DiscV5 and peer exchange can return peers already seen)
|
||||
if err == nil {
|
||||
if p.ENR != nil {
|
||||
if p.ENR != nil && enr != nil && enr.Record() != nil {
|
||||
if enr.Record().Seq() >= p.ENR.Seq() {
|
||||
return
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user