Skip to content

Commit

Permalink
Passing finality status within TxMeta
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusz-sekara committed Jul 11, 2024
1 parent 2bb582b commit 7241829
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion core/services/ocr2/plugins/ccip/ccipexec/ocr2.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ func (r *ExecutionReportingPlugin) getExecutedSeqNrsInRange(ctx context.Context,
}
executedMp := make(map[uint64]bool, len(stateChanges))
for _, stateChange := range stateChanges {
executedMp[stateChange.SequenceNumber] = stateChange.Finalized
executedMp[stateChange.SequenceNumber] = stateChange.TxMeta.IsFinalized()
}
return executedMp, nil
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,6 @@ func (o *OffRamp) GetExecutionStateChangesBetweenSeqNums(ctx context.Context, se

return &cciptypes.ExecutionStateChanged{
SequenceNumber: sc.SequenceNumber,
Finalized: sc.Raw.BlockNumber <= uint64(latestBlock.FinalizedBlockNumber),
}, nil
},
)
Expand All @@ -477,7 +476,7 @@ func (o *OffRamp) GetExecutionStateChangesBetweenSeqNums(ctx context.Context, se
res := make([]cciptypes.ExecutionStateChangedWithTxMeta, 0, len(parsedLogs))
for _, log := range parsedLogs {
res = append(res, cciptypes.ExecutionStateChangedWithTxMeta{
TxMeta: log.TxMeta,
TxMeta: log.TxMeta.UpdateFinalityStatus(uint64(latestBlock.FinalizedBlockNumber)),
ExecutionStateChanged: log.Data,
})
}
Expand Down

0 comments on commit 7241829

Please sign in to comment.