Skip to content

Commit 319f38b

Browse files
author
Dan Laine
authored
Remove check for impossible condition in x/sync (#1348)
1 parent ced2874 commit 319f38b

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

x/sync/network_client.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,6 @@ func (c *networkClient) RequestAny(
186186
// If the limit on active requests is reached, this function blocks until
187187
// a slot becomes available.
188188
func (c *networkClient) Request(ctx context.Context, nodeID ids.NodeID, request []byte) ([]byte, error) {
189-
// TODO danlaine: is it possible for this condition to occur?
190-
if nodeID == ids.EmptyNodeID {
191-
return nil, fmt.Errorf("cannot send request to empty nodeID, nodeID=%s, requestLen=%d", nodeID, len(request))
192-
}
193-
194189
// Take a slot from total [activeRequests] and block until a slot becomes available.
195190
if err := c.activeRequests.Acquire(ctx, 1); err != nil {
196191
return nil, ErrAcquiringSemaphore

0 commit comments

Comments
 (0)