Skip to content

Commit

Permalink
Test without Transmitted logs registered in the contract_transmitte…
Browse files Browse the repository at this point in the history
…r.go
  • Loading branch information
mateusz-sekara committed Jun 19, 2024
1 parent b12ab0c commit 0bc792b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions core/services/relay/evm/contract_transmitter.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,11 @@ func NewOCRContractTransmitter(
return nil, errors.New("invalid ABI, missing transmitted")
}

err := lp.RegisterFilter(ctx, logpoller.Filter{Name: transmitterFilterName(address), EventSigs: []common.Hash{transmitted.ID}, Addresses: []common.Address{address}})
if err != nil {
return nil, err
}
// Commenting out to better understand the impact of Transmitted logs on the database
//err := lp.RegisterFilter(ctx, logpoller.Filter{Name: transmitterFilterName(address), EventSigs: []common.Hash{transmitted.ID}, Addresses: []common.Address{address}, Retention: retention})
//if err != nil {
// return nil, err
//}
if reportToEvmTxMeta == nil {
reportToEvmTxMeta = reportToEvmTxMetaNoop
}
Expand Down
2 changes: 1 addition & 1 deletion core/services/relay/evm/contract_transmitter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func TestContractTransmitter(t *testing.T) {
"0000000000000000000000000000000000000000000000000000000000000002") // epoch
c.On("CallContract", mock.Anything, mock.Anything, mock.Anything).Return(digestAndEpochDontScanLogs, nil).Once()
contractABI, _ := abi.JSON(strings.NewReader(ocr2aggregator.OCR2AggregatorABI))
lp.On("RegisterFilter", mock.Anything, mock.Anything).Return(nil)
//lp.On("RegisterFilter", mock.Anything, mock.Anything).Return(nil)
ot, err := NewOCRContractTransmitter(ctx, gethcommon.Address{}, c, contractABI, mockTransmitter{}, lp, lggr, func(b []byte) (*txmgr.TxMeta, error) {
return &txmgr.TxMeta{}, nil
})
Expand Down

0 comments on commit 0bc792b

Please sign in to comment.