Skip to content

Commit

Permalink
MaxLogsKept = 1 for contract transmitter
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusz-sekara committed Jul 2, 2024
1 parent 572cc60 commit 7bcb033
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/services/relay/evm/contract_transmitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,11 @@ func NewOCRContractTransmitterWithRetention(

// TODO It would be better to keep MaxLogsKept = 1 for the OCR contract transmitter instead of Retention. We are always interested only in the latest log.
// Although MaxLogsKept is present in the Filter struct, it is not supported by LogPoller yet.
err := lp.RegisterFilter(ctx, logpoller.Filter{Name: transmitterFilterName(address), EventSigs: []common.Hash{transmitted.ID}, Addresses: []common.Address{address}, Retention: retention})
err := lp.RegisterFilter(ctx, logpoller.Filter{
Name: transmitterFilterName(address),
EventSigs: []common.Hash{transmitted.ID},
Addresses: []common.Address{address}, Retention: retention, MaxLogsKept: 1},
)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 7bcb033

Please sign in to comment.