From 19453a17e65db96a13dfc36b32144a77642df271 Mon Sep 17 00:00:00 2001 From: Hussam Date: Fri, 1 Mar 2024 16:15:54 -0600 Subject: [PATCH] accept nil return --- p2p/node/p2p_services.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/p2p/node/p2p_services.go b/p2p/node/p2p_services.go index ed443604bd..a54c58fdb8 100644 --- a/p2p/node/p2p_services.go +++ b/p2p/node/p2p_services.go @@ -58,6 +58,10 @@ func (p *P2PNode) requestFromPeer(peerID peer.ID, location common.Location, data // Remove request ID from the map of pending requests p.requestManager.CloseRequest(id) + if recvdType == nil { + return nil, nil + } + // Check the received data type & hash matches the request switch datatype.(type) { case *types.Block: