Skip to content

Commit

Permalink
fix(relayer): wrong block height used (#2387)
Browse files Browse the repository at this point in the history
Wrong block height was used for cursor, xblock height instead of
consensus block height.

issue: none
  • Loading branch information
sideninja authored Nov 5, 2024
1 parent 5b7dd25 commit 855cac6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cchain/provider/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ func newABCIFetchFunc(attCl atypes.QueryClient, cmtCl cmtservice.ServiceClient,
// Caller has to wait and retry in both cases
if !ok || earliestAttestationAtLatestHeight.AttestOffset < fromOffset {
// First attestation hasn't happened yet, return empty and set cursor to latest height
return []xchain.Attestation{}, earliestAttestationAtLatestHeight.BlockHeight, nil
return []xchain.Attestation{}, cursor, nil
}

latestBlockResp, err := cmtCl.GetLatestBlock(ctx, &cmtservice.GetLatestBlockRequest{})
Expand Down

0 comments on commit 855cac6

Please sign in to comment.