From 57cb1f968879c3aafbb930fa6d6b70f03a5eb791 Mon Sep 17 00:00:00 2001 From: Dan Laine Date: Fri, 14 Apr 2023 10:46:57 -0400 Subject: [PATCH] remove check for impossible condition --- x/sync/network_client.go | 5 ----- 1 file changed, 5 deletions(-) diff --git a/x/sync/network_client.go b/x/sync/network_client.go index 7496d1317516..f53ce461df52 100644 --- a/x/sync/network_client.go +++ b/x/sync/network_client.go @@ -186,11 +186,6 @@ func (c *networkClient) RequestAny( // If the limit on active requests is reached, this function blocks until // a slot becomes available. func (c *networkClient) Request(ctx context.Context, nodeID ids.NodeID, request []byte) ([]byte, error) { - // TODO danlaine: is it possible for this condition to occur? - if nodeID == ids.EmptyNodeID { - return nil, fmt.Errorf("cannot send request to empty nodeID, nodeID=%s, requestLen=%d", nodeID, len(request)) - } - // Take a slot from total [activeRequests] and block until a slot becomes available. if err := c.activeRequests.Acquire(ctx, 1); err != nil { return nil, ErrAcquiringSemaphore