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 authored and reductionista committed Aug 24, 2024
1 parent fa1fab4 commit 7d40bb5
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 @@ -114,7 +114,11 @@ func NewOCRContractTransmitter(

// 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: newContractTransmitter.retention})
err := lp.RegisterFilter(ctx, logpoller.Filter{
Name: transmitterFilterName(address),
EventSigs: []common.Hash{transmitted.ID},
Addresses: []common.Address{address}, MaxLogsKept: 1},
)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 7d40bb5

Please sign in to comment.