Skip to content

Commit

Permalink
Add StartEventsListening doc comment
Browse files Browse the repository at this point in the history
  • Loading branch information
khssnv committed Mar 28, 2024
1 parent 17f86a8 commit 0a486b3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions blockchain/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ func NewClient(url string) (*Client, error) {
}, nil
}

// StartEventsListening subscribes for blockchain events and passes events starting from the
// 'begin' block to registered events listeners. Listeners registered after this call will only
// receive live events meaning all listeners which need historical events from 'begin' block
// should be registered at the moment of calling this function. The 'afterBlock' callback is
// invoked after all registered events listeners are already invoked.
func (c *Client) StartEventsListening(
begin types.BlockNumber,
afterBlock func(blockNumber types.BlockNumber, blockHash types.Hash),
Expand Down

0 comments on commit 0a486b3

Please sign in to comment.