Skip to content

Commit

Permalink
Simultaneous RPC during events retrieval pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
khssnv committed Sep 16, 2024
1 parent 18877e7 commit 8071fc0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blockchain/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func (c *Client) ListenEvents(
})

// Sequence historical and live headers.
headersC := make(chan types.Header)
headersC := make(chan types.Header, 2)
g.Go(func() error {
defer close(headersC)

Expand All @@ -152,7 +152,7 @@ func (c *Client) ListenEvents(
})

// Retrieve events skipping blocks before 'begin'.
eventsC := make(chan blockEvents)
eventsC := make(chan blockEvents, 2)
g.Go(func() error {
defer close(eventsC)

Expand Down

0 comments on commit 8071fc0

Please sign in to comment.