From 1152b5bd6449f38e0c96d13345caf51726ba4df9 Mon Sep 17 00:00:00 2001 From: Bruce Riley Date: Tue, 21 Nov 2023 17:57:28 -0600 Subject: [PATCH] Node/EVM: Celo TimeOfBlockByHash is wrong --- node/pkg/watchers/evm/connectors/celo.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node/pkg/watchers/evm/connectors/celo.go b/node/pkg/watchers/evm/connectors/celo.go index d199ed6f22..4cb49b7fbb 100644 --- a/node/pkg/watchers/evm/connectors/celo.go +++ b/node/pkg/watchers/evm/connectors/celo.go @@ -130,12 +130,12 @@ func (c *CeloConnector) TransactionReceipt(ctx context.Context, txHash ethCommon } func (c *CeloConnector) TimeOfBlockByHash(ctx context.Context, hash ethCommon.Hash) (uint64, error) { - block, err := c.client.BlockByHash(ctx, celoCommon.BytesToHash(hash.Bytes())) + block, err := c.client.HeaderByHash(ctx, celoCommon.BytesToHash(hash.Bytes())) if err != nil { return 0, err } - return block.Time(), err + return block.Time, err } func (c *CeloConnector) ParseLogMessagePublished(ethLog ethTypes.Log) (*ethAbi.AbiLogMessagePublished, error) {