-
Notifications
You must be signed in to change notification settings - Fork 2
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
RMN - minor code improvements #289
Conversation
rmnNodes, err := c.rmnHomeReader.GetRMNNodesInfo(rmnRemoteCfg.ConfigDigest) | ||
if err != nil { | ||
return nil, fmt.Errorf("get rmn nodes info: %w", err) | ||
} | ||
|
||
c.lggr.Infow("got RMN nodes info", "nodes", rmnNodes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactoring of the logic that processes lane update requests. Extracted and unit tested a standalone function.
@@ -160,10 +160,7 @@ func (r *peerClient) getOrCreateRageP2PStream(rmnNode rmntypes.HomeNodeInfo) (St | |||
} | |||
|
|||
rmnPeerID := rmnNode.PeerID.String() | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Each rmn node has a field called StreamNamePrefix
. Supports different RMN nodes that are running different RMN offchain version. v1_6 is still hardcoded in initialization until the change is integrated in RMNHome.
@@ -1,19 +1,5 @@ | |||
package slicelib | |||
|
|||
// GroupBy groups a slice based on a specific item property. The returned groups slice is deterministic. | |||
func GroupBy[T any, K comparable](items []T, prop func(T) K) ([]K, map[K][]T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unused function.
|
Added comments about the changes. https://github.com/smartcontractkit/chainlink-ccip/pull/289/files