diff --git a/.changeset/fresh-badgers-pull.md b/.changeset/fresh-badgers-pull.md new file mode 100644 index 00000000000..17255e767da --- /dev/null +++ b/.changeset/fresh-badgers-pull.md @@ -0,0 +1,5 @@ +--- +"chainlink": patch +--- + +#internal change chain reader to use nil blocknumber when reading latest value diff --git a/core/services/relay/evm/method_binding.go b/core/services/relay/evm/method_binding.go index 1958b8fd09e..448f1b9fbf2 100644 --- a/core/services/relay/evm/method_binding.go +++ b/core/services/relay/evm/method_binding.go @@ -115,7 +115,7 @@ func (m *methodBinding) blockNumberFromConfidence(ctx context.Context, confidenc return nil, err } - latest, finalized, err := m.ht.LatestAndFinalizedBlock(ctx) + _, finalized, err := m.ht.LatestAndFinalizedBlock(ctx) if err != nil { return nil, err } @@ -123,7 +123,7 @@ func (m *methodBinding) blockNumberFromConfidence(ctx context.Context, confidenc if confirmations == evmtypes.Finalized { return big.NewInt(finalized.Number), nil } else if confirmations == evmtypes.Unconfirmed { - return big.NewInt(latest.BlockNumber()), nil + return nil, nil } return nil, fmt.Errorf("unknown evm confirmations: %v for contract: %s, method: %s", confirmations, m.contractName, m.method)