Skip to content

Commit

Permalink
fix cs_add_chain_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
makramkd committed Dec 13, 2024
1 parent a0a3d2e commit 71bf9d0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
26 changes: 14 additions & 12 deletions deployment/ccip/changeset/cs_add_chain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,18 +214,20 @@ func TestAddChainInbound(t *testing.T) {
},
{
Changeset: commonchangeset.WrapChangeSet(SetCandidateChangeset),
Config: SetCandidateConfigBase{
HomeChainSelector: e.HomeChainSel,
FeedChainSelector: e.FeedChainSel,
DONChainSelector: newChain,
PluginType: types.PluginTypeCCIPExec,
CCIPOCRParams: DefaultOCRParams(
e.FeedChainSel,
tokenConfig.GetTokenInfo(logger.TestLogger(t), state.Chains[newChain].LinkToken, state.Chains[newChain].Weth9),
nil,
),
MCMS: &MCMSConfig{
MinDelay: 0,
Config: SetCandidateChangesetConfig{
SetCandidateConfigBase: SetCandidateConfigBase{
HomeChainSelector: e.HomeChainSel,
FeedChainSelector: e.FeedChainSel,
DONChainSelector: newChain,
PluginType: types.PluginTypeCCIPExec,
CCIPOCRParams: DefaultOCRParams(
e.FeedChainSel,
tokenConfig.GetTokenInfo(logger.TestLogger(t), state.Chains[newChain].LinkToken, state.Chains[newChain].Weth9),
nil,
),
MCMS: &MCMSConfig{
MinDelay: 0,
},
},
},
},
Expand Down
3 changes: 3 additions & 0 deletions deployment/ccip/changeset/cs_ccip_home.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,9 @@ func PromoteAllCandidatesChangeset(
}, nil
}

// SetCandidateConfigBase is a common base config struct for AddDonAndSetCandidateChangesetConfig and SetCandidateChangesetConfig.
// This is extracted to deduplicate most of the validation logic.
// Remaining validation logic is done in the specific config structs that inherit from this.
type SetCandidateConfigBase struct {
HomeChainSelector uint64
FeedChainSelector uint64
Expand Down

0 comments on commit 71bf9d0

Please sign in to comment.