From bf15d0b414432b5408a1f108ea57e99ba867867f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bla=C5=BE=20Hrastnik?= Date: Fri, 3 Jan 2025 20:35:43 +0900 Subject: [PATCH] Add in check for multiple keys --- deployment/ccip/changeset/cs_jobspec.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/deployment/ccip/changeset/cs_jobspec.go b/deployment/ccip/changeset/cs_jobspec.go index 19fb2e7ab0b..c311fdb9ff3 100644 --- a/deployment/ccip/changeset/cs_jobspec.go +++ b/deployment/ccip/changeset/cs_jobspec.go @@ -1,6 +1,8 @@ package changeset import ( + "fmt" + "github.com/smartcontractkit/ccip-owner-contracts/pkg/proposal/timelock" chainsel "github.com/smartcontractkit/chain-selectors" @@ -34,9 +36,13 @@ func CCIPCapabilityJobspec(env deployment.Environment, _ any) (deployment.Change break } _, exists := keyBundles[family] - if !exists { - keyBundles[family] = config.KeyBundleID + if exists { + if keyBundles[family] != config.KeyBundleID { + return deployment.ChangesetOutput{}, fmt.Errorf("multiple different %v OCR keys found for node %v", family, node.PeerID) + } + continue } + keyBundles[family] = config.KeyBundleID } var spec string