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: