diff --git a/plugins/autopeering/types/peerregister/peer_register.go b/plugins/autopeering/types/peerregister/peer_register.go index abb97e52c96669afc18bc150f1c377a28a233ba1..b90608dd84d1063e2352002af1109da3bd813a09 100644 --- a/plugins/autopeering/types/peerregister/peer_register.go +++ b/plugins/autopeering/types/peerregister/peer_register.go @@ -42,6 +42,12 @@ func (this *PeerRegister) AddOrUpdate(peer *peer.Peer, lock ...bool) bool { existingPeer.Address = peer.Address existingPeer.GossipPort = peer.GossipPort existingPeer.PeeringPort = peer.PeeringPort + existingPeer.Salt = peer.Salt + + // also update the public key if not yet present + if existingPeer.Identity.PublicKey == nil { + existingPeer.Identity.PublicKey = peer.Identity.PublicKey + } this.Events.Update.Trigger(existingPeer)