@@ -10,12 +10,6 @@ import (
1010 "time"
1111
1212 "github.com/ava-labs/avalanche-cli/pkg/blockchain"
13-
14- "github.com/ava-labs/avalanchego/config"
15- "github.com/ava-labs/avalanchego/utils/units"
16-
17- "github.com/ethereum/go-ethereum/common"
18-
1913 "github.com/ava-labs/avalanche-cli/pkg/cobrautils"
2014 "github.com/ava-labs/avalanche-cli/pkg/constants"
2115 "github.com/ava-labs/avalanche-cli/pkg/contract"
@@ -29,12 +23,16 @@ import (
2923 "github.com/ava-labs/avalanche-cli/pkg/utils"
3024 "github.com/ava-labs/avalanche-cli/pkg/ux"
3125 "github.com/ava-labs/avalanche-cli/pkg/validatormanager"
26+ sdkutils "github.com/ava-labs/avalanche-cli/sdk/utils"
3227 "github.com/ava-labs/avalanche-cli/sdk/validator"
28+ "github.com/ava-labs/avalanchego/config"
3329 "github.com/ava-labs/avalanchego/ids"
3430 avagoconstants "github.com/ava-labs/avalanchego/utils/constants"
3531 "github.com/ava-labs/avalanchego/utils/formatting/address"
3632 "github.com/ava-labs/avalanchego/utils/logging"
33+ "github.com/ava-labs/avalanchego/utils/units"
3734 warpMessage "github.com/ava-labs/avalanchego/vms/platformvm/warp/message"
35+ "github.com/ethereum/go-ethereum/common"
3836 "github.com/spf13/cobra"
3937)
4038
@@ -177,7 +175,8 @@ func addValidator(_ *cobra.Command, args []string) error {
177175 clusterNameFlagValue = sc .Networks [network .Name ()].ClusterName
178176 }
179177
180- fee := network .GenesisParams ().TxFeeConfig .StaticFeeConfig .AddSubnetValidatorFee
178+ // TODO: will estimate fee in subsecuent PR
179+ fee := uint64 (0 )
181180 kc , err := keychain .GetKeychainFromCmdLineFlags (
182181 app ,
183182 "to pay for transaction fees on P-Chain" ,
@@ -501,7 +500,10 @@ func CallAddValidator(
501500 if err != nil {
502501 return err
503502 }
503+ aggregatorCtx , aggregatorCancel := sdkutils .GetTimedContext (constants .SignatureAggregatorTimeout )
504+ defer aggregatorCancel ()
504505 signedMessage , validationID , err := validatormanager .InitValidatorRegistration (
506+ aggregatorCtx ,
505507 app ,
506508 network ,
507509 rpcURL ,
@@ -543,6 +545,7 @@ func CallAddValidator(
543545 }
544546
545547 if err := validatormanager .FinishValidatorRegistration (
548+ aggregatorCtx ,
546549 app ,
547550 network ,
548551 rpcURL ,
0 commit comments