Skip to content

Commit

Permalink
Remove permissioned err during remove validator (#2441)
Browse files Browse the repository at this point in the history
* remove permission err

* remove permission err
  • Loading branch information
sukantoraymond authored Dec 13, 2024
1 parent 77f8819 commit 15606d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions cmd/blockchaincmd/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,10 @@ func UpdateKeychainWithSubnetControlKeys(
if subnetID == ids.Empty {
return errNoSubnetID
}
isPermissioned, controlKeys, _, err := txutils.GetOwners(network, subnetID)
_, controlKeys, _, err := txutils.GetOwners(network, subnetID)
if err != nil {
return err
}
if !isPermissioned {
return ErrNotPermissionedSubnet
}
// add control keys to the keychain whenever possible
if err := kc.AddAddresses(controlKeys); err != nil {
return err
Expand Down
5 changes: 1 addition & 4 deletions cmd/blockchaincmd/remove_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,13 +346,10 @@ func removeValidatorSOV(
}

func removeValidatorNonSOV(deployer *subnet.PublicDeployer, network models.Network, subnetID ids.ID, kc *keychain.Keychain, blockchainName string, nodeID ids.NodeID) error {
isPermissioned, controlKeys, threshold, err := txutils.GetOwners(network, subnetID)
_, controlKeys, threshold, err := txutils.GetOwners(network, subnetID)
if err != nil {
return err
}
if !isPermissioned {
return ErrNotPermissionedSubnet
}

// add control keys to the keychain whenever possible
if err := kc.AddAddresses(controlKeys); err != nil {
Expand Down

0 comments on commit 15606d7

Please sign in to comment.