Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
sukantoraymond committed Oct 8, 2024
1 parent 031128c commit 136fd35
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 55 deletions.
24 changes: 1 addition & 23 deletions cmd/blockchaincmd/add_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,28 +231,6 @@ func CallAddValidator(
ux.Logger.PrintToUser("Change Address: %s", changeAddr)
ux.Logger.PrintToUser("Inputs complete, issuing transaction to add the provided validator information...")

//type RegisterSubnetValidatorTx struct {
// // Metadata, inputs and outputs
// BaseTx
// // Balance <= sum($AVAX inputs) - sum($AVAX outputs) - TxFee.
// Balance uint64 `json:"balance"`
// // [Signer] is the BLS key for this validator.
// // Note: We do not enforce that the BLS key is unique across all validators.
// // This means that validators can share a key if they so choose.
// // However, a NodeID does uniquely map to a BLS key
// Signer signer.Signer `json:"signer"`
// // Leftover $AVAX from the Subnet Validator's Balance will be issued to
// // this owner after it is removed from the validator set.
// ChangeOwner fx.Owner `json:"changeOwner"`
// // AddressedCall with Payload:
// // - SubnetID
// // - NodeID (must be Ed25519 NodeID)
// // - Weight
// // - BLS public key
// // - Expiry
// Message warp.Message `json:"message"`
//}

blsInfo, err := getBLSInfo(publicKey, pop)
if err != nil {
return fmt.Errorf("failure parsing BLS info: %w", err)
Expand Down Expand Up @@ -283,7 +261,7 @@ func CallAddValidator(
return nil
}

func generateWarpMessageAddValidator(SubnetID ids.ID, NodeID ids.NodeID, weight uint64, blsPublicKey string, expiry uint64) (warpPlatformVM.Message, error) {
func generateWarpMessageAddValidator(subnetID ids.ID, NodeID ids.NodeID, weight uint64, blsPublicKey string, expiry uint64) (warpPlatformVM.Message, error) {
return warpPlatformVM.Message{}, nil
}

Expand Down
12 changes: 2 additions & 10 deletions cmd/blockchaincmd/change_weight.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ package blockchaincmd
import (
"errors"
"fmt"
"os"

"github.com/ava-labs/avalanche-cli/pkg/cobrautils"
"github.com/ava-labs/avalanche-cli/pkg/constants"
"github.com/ava-labs/avalanche-cli/pkg/keychain"
Expand All @@ -15,7 +17,6 @@ import (
"github.com/ava-labs/avalanche-cli/pkg/ux"
"github.com/ava-labs/avalanchego/ids"
"github.com/spf13/cobra"
"os"
)

// avalanche blockchain addValidator
Expand Down Expand Up @@ -47,9 +48,6 @@ func updateWeight(_ *cobra.Command, args []string) error {
return err
}

//TODO: add check for non SOV subnet
// return err if non SOV

network, err := networkoptions.GetNetworkFromCmdLineFlags(
app,
"",
Expand Down Expand Up @@ -177,12 +175,6 @@ func updateWeight(_ *cobra.Command, args []string) error {
return CallAddValidator(deployer, network, kc, useLedger, blockchainName, nodeID.String())
}

// TODO: implement checkIfSubnetIsSOV
// checkIfSubnetIsSOV returns true if Subnet is SOV from P Chain
func checkIfSubnetIsSOV() (bool, error) {
return false, nil
}

// getValidatorBalanceFromPChain gets remaining balance of validator from p chain
func getValidatorBalanceFromPChain() (uint64, error) {
return 0, nil
Expand Down
22 changes: 0 additions & 22 deletions cmd/blockchaincmd/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -600,28 +600,6 @@ func deployBlockchain(cmd *cobra.Command, args []string) error {
}
}

// type ConvertSubnetTx struct {
// // Metadata, inputs and outputs
// BaseTx
// // ID of the Subnet to transform
// // Restrictions:
// // - Must not be the Primary Network ID
// Subnet ids.ID `json:"subnetID"`
// // BlockchainID where the Subnet manager lives
// ChainID ids.ID `json:"chainID"`
// // Address of the Subnet manager
// Address []byte `json:"address"`
// // Initial pay-as-you-go validators for the Subnet
// Validators []SubnetValidator `json:"validators"`
// // Authorizes this conversion
// SubnetAuth verify.Verifiable `json:"subnetAuthorization"`
// }

//avaGoBootstrapValidators, err := convertToAvalancheGoSubnetValidator(bootstrapValidators)
//if err != nil {
// return err
//}
// TODO: replace with avalanchego subnetValidators once implemented
isFullySigned, convertSubnetTxID, tx, remainingSubnetAuthKeys, err := deployer.ConvertSubnet(
controlKeys,
subnetAuthKeys,
Expand Down

0 comments on commit 136fd35

Please sign in to comment.