From d5ec7967a9c2acfcd861fad65fd352eba4537351 Mon Sep 17 00:00:00 2001 From: Krish Date: Thu, 9 Jan 2025 16:57:46 +0800 Subject: [PATCH] fix: adapt bsc fix --- op-service/sources/eth_client.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/op-service/sources/eth_client.go b/op-service/sources/eth_client.go index e2db86dcddef..5c13a56d7d05 100644 --- a/op-service/sources/eth_client.go +++ b/op-service/sources/eth_client.go @@ -282,7 +282,9 @@ func (s *EthClient) InfoByLabel(ctx context.Context, label eth.BlockLabel) (eth. func (s *EthClient) BSCInfoByLabel(ctx context.Context, label eth.BlockLabel) (eth.BlockInfo, error) { // can't hit the cache when querying the head due to reorgs / changes. if label == eth.Finalized { - return s.bscFinalizedHeader(ctx, 21) + // -3 means automatically use the len(validators) of BSC network + // refs: https://github.com/bnb-chain/bsc/pull/2844 + return s.bscFinalizedHeader(ctx, -3) } return s.headerCall(ctx, "eth_getBlockByNumber", label) }