Skip to content

Commit 77affc0

Browse files
authored
fix: getEvents returning out-of-range (#2893)
corrected toBlock on canonicalEvents only scenario
1 parent e82e4a5 commit 77affc0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

blockchain/event_filter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ func (e *EventFilter) Events(cToken *ContinuationToken, chunkSize uint64) ([]*Fi
136136

137137
// only canonical blocks
138138
if e.toBlock <= latest {
139-
return e.canonicalEvents(matchedEvents, curBlock, latest, skippedEvents, chunkSize)
139+
return e.canonicalEvents(matchedEvents, curBlock, e.toBlock, skippedEvents, chunkSize)
140140
}
141141

142142
var rToken *ContinuationToken

0 commit comments

Comments
 (0)