From d07a359e0b80ec825f6030c7a672625bebe60972 Mon Sep 17 00:00:00 2001 From: vyzaldysanchez Date: Thu, 5 Dec 2024 15:29:35 -0400 Subject: [PATCH] Adds `nodeID` as part of the `OCRKeys` fields --- deployment/common/view/nops.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/deployment/common/view/nops.go b/deployment/common/view/nops.go index 7d705f694d3..4a6709938b0 100644 --- a/deployment/common/view/nops.go +++ b/deployment/common/view/nops.go @@ -5,13 +5,13 @@ import ( "fmt" nodev1 "github.com/smartcontractkit/chainlink-protos/job-distributor/v1/node" + "github.com/smartcontractkit/chainlink/deployment" ) type NopView struct { // NodeID is the unique identifier of the node NodeID string `json:"nodeID"` - PeerID string `json:"peerID"` IsBootstrap bool `json:"isBootstrap"` OCRKeys map[string]OCRKeyView `json:"ocrKeys"` PayeeAddress string `json:"payeeAddress"` @@ -21,6 +21,7 @@ type NopView struct { } type OCRKeyView struct { + NodeID string `json:"nodeID"` OffchainPublicKey string `json:"offchainPublicKey"` OnchainPublicKey string `json:"onchainPublicKey"` PeerID string `json:"peerID"` @@ -50,7 +51,6 @@ func GenerateNopsView(nodeIds []string, oc deployment.OffchainClient) (map[strin } nop := NopView{ NodeID: node.NodeID, - PeerID: node.PeerID.String(), IsBootstrap: node.IsBootstrap, OCRKeys: make(map[string]OCRKeyView), PayeeAddress: node.AdminAddr, @@ -60,6 +60,7 @@ func GenerateNopsView(nodeIds []string, oc deployment.OffchainClient) (map[strin } for details, ocrConfig := range node.SelToOCRConfig { nop.OCRKeys[details.ChainName] = OCRKeyView{ + NodeID: node.NodeID, OffchainPublicKey: fmt.Sprintf("%x", ocrConfig.OffchainPublicKey[:]), OnchainPublicKey: fmt.Sprintf("%x", ocrConfig.OnchainPublicKey[:]), PeerID: ocrConfig.PeerID.String(),