Skip to content

Commit 1865483

Browse files
committed
fixup! chore: short-circuit unnecessary message processing
1 parent c387903 commit 1865483

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

impl/graphsync.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -476,10 +476,10 @@ func (gsr *graphSyncReceiver) ReceiveMessage(
476476
blocks := incoming.Blocks()
477477

478478
if len(requests) > 0 {
479-
gsr.graphSync().responseManager.ProcessRequests(ctx, sender, incoming.Requests())
479+
gsr.graphSync().responseManager.ProcessRequests(ctx, sender, requests)
480480
}
481481
if len(responses) > 0 || len(blocks) > 0 {
482-
gsr.graphSync().requestManager.ProcessResponses(sender, incoming.Responses(), incoming.Blocks())
482+
gsr.graphSync().requestManager.ProcessResponses(sender, responses, blocks)
483483
}
484484
}
485485

0 commit comments

Comments
 (0)