@@ -106,10 +106,10 @@ func calcStartBlock(ctx context.Context, chain ethereum.ChainReader, pastBlocks
106106 return current .Number .Uint64 () - pastBlocks , nil
107107}
108108
109- // ReadAll reads all past and future events into `sink`.
109+ // Read reads all past and future events into `sink`.
110110// Can be aborted by cancelling `ctx` or `Close()`.
111111// It is possible that the same event is read more than once.
112- func (s * EventSub ) ReadAll (ctx context.Context , sink chan <- * Event ) error {
112+ func (s * EventSub ) Read (ctx context.Context , sink chan <- * Event ) error {
113113 // First read into the past.
114114 if err := s .readPast (ctx , sink ); err != nil {
115115 return errors .WithMessage (err , "reading logs" )
@@ -128,13 +128,6 @@ func (s *EventSub) ReadPast(ctx context.Context, sink chan<- *Event) error {
128128 return errors .WithMessage (s .readPast (ctx , sink ), "reading logs" )
129129}
130130
131- // ReadFuture reads all future events into `sink`.
132- // Can be aborted by cancelling `ctx` or `Close()`.
133- // It is possible that the same event is read more than once.
134- func (s * EventSub ) ReadFuture (ctx context.Context , sink chan <- * Event ) error {
135- return errors .WithMessage (s .readFuture (ctx , sink ), "reading logs" )
136- }
137-
138131func (s * EventSub ) readPast (ctx context.Context , sink chan <- * Event ) error {
139132 var logs []types.Log
140133 // Two read loops are needed if the event sub is closed before all events
0 commit comments