Skip to content
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.

Commit

Permalink
accept nil return
Browse files Browse the repository at this point in the history
  • Loading branch information
Djadih committed Mar 1, 2024
1 parent 80282ba commit 19453a1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions p2p/node/p2p_services.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 19453a1

Please sign in to comment.