Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
arturrez committed Oct 16, 2024
1 parent 93ba0c6 commit 662105f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
13 changes: 8 additions & 5 deletions cmd/blockchaincmd/add_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func promptValidatorBalance() (uint64, error) {
func CallAddValidator(
deployer *subnet.PublicDeployer,
network models.Network,
kc *keychain.Keychain,
_ *keychain.Keychain,
useLedgerSetting bool,
blockchainName string,
nodeIDStrFormat string,
Expand Down Expand Up @@ -192,10 +192,10 @@ func CallAddValidator(
}

// TODO: implement getting validator manager controller address
//kcKeys, err := kc.PChainFormattedStrAddresses()
//if err != nil {
// return err
//}
// kcKeys, err := kc.PChainFormattedStrAddresses()
// if err != nil {
// return err
// }

if nodeIDStr == "" {
nodeID, err := PromptNodeID("add as a blockchain validator")
Expand Down Expand Up @@ -261,6 +261,9 @@ func CallAddValidator(
return nil
}

// TODO: generate warp message
//
//nolint:all
func generateWarpMessageAddValidator(subnetID ids.ID, nodeID ids.NodeID, weight uint64, blsPublicKey string, expiry uint64) (warpPlatformVM.Message, error) {
return warpPlatformVM.Message{}, nil
}
Expand Down
6 changes: 3 additions & 3 deletions cmd/blockchaincmd/remove_validator.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,18 +184,18 @@ func removeValidator(_ *cobra.Command, args []string) error {

// TODO: implement getMinNonce
// getMinNonce gets minNonce associated with the validationID from P-Chain
func getMinNonce(validationID [32]byte) (uint64, error) {
func getMinNonce(validationID [32]byte) (uint64, error) { //nolint:all
return 0, nil
}

// TODO: implement getValidationID
// get validation ID for a node from P Chain
func getValidationID(nodeID ids.NodeID) [32]byte {
func getValidationID(nodeID ids.NodeID) [32]byte { //nolint:all
return [32]byte{}
}

// TODO: implement generateWarpMessageRemoveValidator
func generateWarpMessageRemoveValidator(validationID [32]byte, nonce, weight uint64) (warpPlatformVM.Message, error) {
func generateWarpMessageRemoveValidator(validationID [32]byte, nonce, weight uint64) (warpPlatformVM.Message, error) { //nolint:all
return warpPlatformVM.Message{}, nil
}

Expand Down
9 changes: 3 additions & 6 deletions cmd/nodecmd/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,9 @@ var (
iops int
volumeType string
volumeSize int
versionComments = map[string]string{
"v1.11.0-fuji": " (recommended for fuji durango)",
}
grafanaPkg string
wizSubnet string
publicHTTPPortAccess bool
grafanaPkg string
wizSubnet string
publicHTTPPortAccess bool
)

func newCreateCmd() *cobra.Command {
Expand Down
7 changes: 4 additions & 3 deletions pkg/subnet/public.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,12 +119,14 @@ func (d *PublicDeployer) AddValidatorNonSOV(
return false, tx, remainingSubnetAuthKeys, nil
}

//nolint:all
func (d *PublicDeployer) SetL1ValidatorWeight(
message warp.Message,
) (*txs.Tx, error) {
return nil, nil
}

//nolint:all
func (d *PublicDeployer) RegisterL1Validator(
balance uint64,
signer signer.ProofOfPossession,
Expand Down Expand Up @@ -860,11 +862,10 @@ func printFee(kind string, wallet primary.Wallet, unsignedTx txs.UnsignedTx) err
}
txFee, err := pFeeCalculator.CalculateFee(unsignedTx)
if err != nil {
if errors.Is(err, avagofee.ErrUnsupportedTx) {
ux.Logger.PrintToUser(logging.Yellow.Wrap("unable to get %s fee: not supported by %s calculator"), kind, calcKind)
} else {
if !errors.Is(err, avagofee.ErrUnsupportedTx) {
return err
}
ux.Logger.PrintToUser(logging.Yellow.Wrap("unable to get %s fee: not supported by %s calculator"), kind, calcKind)
} else {
ux.Logger.PrintToUser(logging.Yellow.Wrap("%s fee: %.9f AVAX"), kind, float64(txFee)/float64(units.Avax))
}
Expand Down

0 comments on commit 662105f

Please sign in to comment.