@@ -59,11 +59,11 @@ func TestEvents(t *testing.T) {
5959 }
6060
6161 t .Run ("filter non-existent" , func (t * testing.T ) {
62- t .Run ("block number" , func (t * testing.T ) {
62+ t .Run ("block number - bound to latest " , func (t * testing.T ) {
6363 args .ToBlock = & rpc.BlockID {Number : 55 }
6464 events , err := handler .Events (args )
6565 require .Nil (t , err )
66- require .Len (t , events .Events , 5 )
66+ require .Len (t , events .Events , 4 )
6767 })
6868
6969 t .Run ("block hash" , func (t * testing.T ) {
@@ -208,7 +208,7 @@ func TestEvents(t *testing.T) {
208208
209209 t .Run ("get pending events with pagination" , func (t * testing.T ) {
210210 var err error
211- pendingB , err = gw .BlockByNumber (t .Context (), 5 )
211+ pendingB , err = gw .BlockByNumber (t .Context (), 6 )
212212 require .Nil (t , err )
213213
214214 args = rpc.EventsArg {
@@ -238,9 +238,9 @@ func TestEvents(t *testing.T) {
238238 require .NotEmpty (t , events .ContinuationToken )
239239 }
240240
241- assert .Equal (t , actualEvent .From , expectedEvent .From )
242- assert .Equal (t , actualEvent .Keys , expectedEvent .Keys )
243- assert .Equal (t , actualEvent .Data , expectedEvent .Data )
241+ assert .Equal (t , expectedEvent .From , actualEvent .From )
242+ assert .Equal (t , expectedEvent .Keys , actualEvent .Keys )
243+ assert .Equal (t , expectedEvent .Data , actualEvent .Data )
244244
245245 args .ContinuationToken = events .ContinuationToken
246246 }
0 commit comments