From 7aa620d6755baf40bdc55428a671f56804bf93fb Mon Sep 17 00:00:00 2001 From: David Date: Mon, 13 Jan 2025 14:00:38 +0800 Subject: [PATCH] fix(taiko-client): check inner iterator errors in `BlockProposedIterator` --- .../event_iterator/block_proposed_iterator.go | 8 ++++++++ 1 file changed, 8 insertions(+) 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 67fc0fea23d..e33fc4a5af9 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 @@ -170,6 +170,14 @@ func assembleBlockProposedIteratorCallback( updateCurrentFunc(current) } + // Check iterator errors. + if iter.Error() != nil { + return iter.Error() + } + if iterOntake.Error() != nil { + return iter.Error() + } + return nil } }