Skip to content

Commit

Permalink
Properly scope logpoller to feedID for mercury
Browse files Browse the repository at this point in the history
  • Loading branch information
samsondav committed Jun 21, 2023
1 parent f12f5ae commit 8859862
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion core/services/relay/evm/evm.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func FilterNamesFromRelayArgs(args relaytypes.RelayArgs) (filterNames []string,
}

if relayConfig.FeedID != nil {
filterNames = []string{mercury.FilterName(addr.Address())}
filterNames = []string{mercury.FilterName(addr.Address(), *relayConfig.FeedID)}
} else {
filterNames = []string{configPollerFilterName(addr.Address()), transmitterFilterName(addr.Address())}
}
Expand Down
6 changes: 3 additions & 3 deletions core/services/relay/evm/mercury/config_poller.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@ type ConfigPoller struct {
subscription pg.Subscription
}

func FilterName(addr common.Address) string {
return logpoller.FilterName("OCR2 Mercury ConfigPoller", addr.String())
func FilterName(addr common.Address, feedID common.Hash) string {
return logpoller.FilterName("OCR3 Mercury ConfigPoller", addr.String(), feedID.Hex())
}

// NewConfigPoller creates a new Mercury ConfigPoller
func NewConfigPoller(lggr logger.Logger, destChainPoller logpoller.LogPoller, addr common.Address, feedId common.Hash, eventBroadcaster pg.EventBroadcaster) (*ConfigPoller, error) {
err := destChainPoller.RegisterFilter(logpoller.Filter{Name: FilterName(addr), EventSigs: []common.Hash{FeedScopedConfigSet}, Addresses: []common.Address{addr}})
err := destChainPoller.RegisterFilter(logpoller.Filter{Name: FilterName(addr, feedId), EventSigs: []common.Hash{FeedScopedConfigSet}, Addresses: []common.Address{addr}})
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 8859862

Please sign in to comment.