From 2201204418851c4e7becb4dc50dd2f3ba1b78917 Mon Sep 17 00:00:00 2001 From: Aleksandr Bezobchuk Date: Tue, 12 Jan 2021 08:56:08 -0500 Subject: [PATCH] blockchain v0: no-op on empty peer IDs --- blockchain/v0/reactor.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/blockchain/v0/reactor.go b/blockchain/v0/reactor.go index 90fb12635..191f9d608 100644 --- a/blockchain/v0/reactor.go +++ b/blockchain/v0/reactor.go @@ -322,6 +322,10 @@ func (r *Reactor) processBlockchainCh() { func (r *Reactor) processPeerUpdate(peerUpdate p2p.PeerUpdate) { r.Logger.Debug("received peer update", "peer", peerUpdate.PeerID, "status", peerUpdate.Status) + if len(peerUpdate.PeerID) == 0 { + return + } + switch peerUpdate.Status { case p2p.PeerStatusNew, p2p.PeerStatusUp: // send a status update the newly added peer