Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly scope logpoller to feedID for mercury #9680

Merged
merged 1 commit into from
Jun 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading