From 8ece528f8c4d4d6c47443b096ad2952cfbae751e Mon Sep 17 00:00:00 2001 From: luanxu-mxc Date: Wed, 13 Nov 2024 05:44:32 +0800 Subject: [PATCH] chore(taiko-client): fix upgrade error --- packages/taiko-client/driver/chain_syncer/blob/syncer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/taiko-client/driver/chain_syncer/blob/syncer.go b/packages/taiko-client/driver/chain_syncer/blob/syncer.go index 482c9e96..8012b1a8 100644 --- a/packages/taiko-client/driver/chain_syncer/blob/syncer.go +++ b/packages/taiko-client/driver/chain_syncer/blob/syncer.go @@ -233,7 +233,7 @@ func (s *Syncer) onBlockProposed( } if err != nil { // CHANGE(MOONCHAIN): upgrade height may anchor failed - if meta.GetBlockID().Uint64() == encoding.GetProtocolConfig(s.rpc.L2.ChainID.Uint64()).OntakeForkHeight { + if meta.GetBlockID().Uint64()-1 == encoding.GetProtocolConfig(s.rpc.L2.ChainID.Uint64()).OntakeForkHeight { parent, err = s.rpc.L2.HeaderByNumber(ctx, meta.GetBlockID()) if err != nil { return fmt.Errorf("failed to fetch L2 parent block migrate: %w", err)