diff --git a/packages/taiko-client/pkg/chain_iterator/event_iterator/block_proposed_iterator.go b/packages/taiko-client/pkg/chain_iterator/event_iterator/block_proposed_iterator.go index e33fc4a5af9..3a319cfd520 100644 --- a/packages/taiko-client/pkg/chain_iterator/event_iterator/block_proposed_iterator.go +++ b/packages/taiko-client/pkg/chain_iterator/event_iterator/block_proposed_iterator.go @@ -111,16 +111,6 @@ func assembleBlockProposedIteratorCallback( ) error { endHeight := end.Number.Uint64() - iter, err := taikoL1.FilterBlockProposed( - &bind.FilterOpts{Start: start.Number.Uint64(), End: &endHeight, Context: ctx}, - filterQuery, - nil, - ) - if err != nil { - return err - } - defer iter.Close() - iterOntake, err := taikoL1.FilterBlockProposedV2( &bind.FilterOpts{Start: start.Number.Uint64(), End: &endHeight, Context: ctx}, filterQuery, @@ -130,26 +120,6 @@ func assembleBlockProposedIteratorCallback( } defer iterOntake.Close() - for iter.Next() { - event := iter.Event - - if err := callback(ctx, metadata.NewTaikoDataBlockMetadataLegacy(event), eventIter.end); err != nil { - return err - } - - if eventIter.isEnd { - endFunc() - return nil - } - - current, err := client.HeaderByHash(ctx, event.Raw.BlockHash) - if err != nil { - return err - } - - updateCurrentFunc(current) - } - for iterOntake.Next() { event := iterOntake.Event @@ -171,11 +141,8 @@ func assembleBlockProposedIteratorCallback( } // Check iterator errors. - if iter.Error() != nil { - return iter.Error() - } if iterOntake.Error() != nil { - return iter.Error() + return iterOntake.Error() } return nil