Skip to content

Commit

Permalink
add-validator-test
Browse files Browse the repository at this point in the history
  • Loading branch information
sukantoraymond committed Jun 3, 2024
1 parent 81384b6 commit 71349a6
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions subnet/add_validator_subnet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
package subnet

import (
"avalanche-tooling-sdk-go/avalanche"
"avalanche-tooling-sdk-go/wallet"
"fmt"

Check failure on line 7 in subnet/add_validator_subnet_test.go

View workflow job for this annotation

GitHub Actions / Lint

File is not `gofumpt`-ed (gofumpt)
"github.com/ava-labs/avalanche-tooling-sdk-go/avalanche"
"github.com/ava-labs/avalanche-tooling-sdk-go/wallet"
"github.com/ava-labs/avalanchego/ids"
"github.com/ava-labs/avalanchego/vms/secp256k1fx"
"github.com/ava-labs/avalanchego/wallet/subnet/primary"
"golang.org/x/net/context"
"testing"

Check failure on line 14 in subnet/add_validator_subnet_test.go

View workflow job for this annotation

GitHub Actions / Lint

File is not `gofumpt`-ed (gofumpt)
"time"
)

func TestAddValidatorDeploy(_ *testing.T) {
Expand Down Expand Up @@ -41,5 +43,14 @@ func TestAddValidatorDeploy(_ *testing.T) {
createSubnetTx, _ := newSubnet.CreateSubnetTx(wallet)
fmt.Printf("deploySubnetTx %s", createSubnetTx)
createBlockchainTx, _ := newSubnet.CreateBlockchainTx(wallet)
fmt.Printf("deploySubnetTx %s", createBlockchainTx)
fmt.Printf("deployBlockchainTx %s", createBlockchainTx)
nodeID, _ := ids.NodeIDFromString("node-123")
validatorInput := ValidatorParams{
NodeID: nodeID,
Duration: time.Hour * 48,
Weight: 20,
Network: avalanche.Network{Kind: avalanche.Fuji},
}
addValidatorTx, _ := newSubnet.AddValidator(wallet, validatorInput)
fmt.Printf("addValidatorTx %s", addValidatorTx)
}

0 comments on commit 71349a6

Please sign in to comment.