Skip to content

Commit

Permalink
Merge branch 'ph/priority-validators' of https://github.com/cosmos/in…
Browse files Browse the repository at this point in the history
…terchain-security into ph/priority-validators
  • Loading branch information
kirdatatjana committed Oct 16, 2024
2 parents da41d15 + 508aa1c commit a7572eb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
- Allow consumer chains to specify a list of priority validators that are included in the validator set before other validators are considered
([\#xxxx](https://github.com/cosmos/interchain-security/pull/xxxx))
([\#2101](https://github.com/cosmos/interchain-security/pull/2101))
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
- Allow consumer chains to specify a list of priority validators that are included in the validator set before other validators are considered
([\#xxxx](https://github.com/cosmos/interchain-security/pull/xxxx))
([\#2101](https://github.com/cosmos/interchain-security/pull/2101))
2 changes: 1 addition & 1 deletion x/ccv/provider/keeper/power_shaping.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func (k Keeper) CapValidatorSet(
return validators
}

// Filter and sort the priority list
// Filter and sort the priority list by power
priorityValidators := k.FilterAndSortPriorityList(powerShapingParameters.Prioritylist, validators)

// Create a map to keep track of added validators
Expand Down
4 changes: 2 additions & 2 deletions x/ccv/provider/keeper/power_shaping_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,12 +293,12 @@ func TestCapValidatorSet(t *testing.T) {
expectedValidators: []providertypes.ConsensusValidator{validatorD, validatorC, validatorB},
},
{
name: "ValidatorSetCap = 2 ,with priority list",
name: "ValidatorSetCap = 2, with priority list",
powerShapingParameters: providertypes.PowerShapingParameters{ValidatorSetCap: 2, Prioritylist: []string{string(validatorA.ProviderConsAddr), string(validatorB.ProviderConsAddr)}},
expectedValidators: []providertypes.ConsensusValidator{validatorB, validatorA},
},
{
name: "ValidatorSetCap = 3 ,with partial priority list",
name: "ValidatorSetCap = 3, with partial priority list",
powerShapingParameters: providertypes.PowerShapingParameters{ValidatorSetCap: 3, Prioritylist: []string{string(validatorA.ProviderConsAddr)}},
expectedValidators: []providertypes.ConsensusValidator{validatorA, validatorD, validatorC},
},
Expand Down

0 comments on commit a7572eb

Please sign in to comment.