Skip to content

Commit

Permalink
Merge pull request #567 from ava-labs/fix-pclient-dial
Browse files Browse the repository at this point in the history
use rpc options when bootstrapping network
  • Loading branch information
cam-schultz authored Nov 26, 2024
2 parents 376ce54 + 0af03ea commit f12ae46
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion peers/app_request_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"github.com/ava-labs/avalanchego/utils/set"
"github.com/ava-labs/avalanchego/vms/platformvm"
"github.com/ava-labs/avalanchego/vms/platformvm/warp"
"github.com/ava-labs/awm-relayer/peers/utils"
"github.com/ava-labs/awm-relayer/peers/validators"
"github.com/prometheus/client_golang/prometheus"
"go.uber.org/zap"
Expand Down Expand Up @@ -160,7 +161,8 @@ func NewNetwork(
}

pClient := platformvm.NewClient(cfg.GetPChainAPI().BaseURL)
vdrs, err := pClient.GetCurrentValidators(context.Background(), constants.PrimaryNetworkID, nil)
options := utils.InitializeOptions(cfg.GetPChainAPI())
vdrs, err := pClient.GetCurrentValidators(context.Background(), constants.PrimaryNetworkID, nil, options...)
if err != nil {
logger.Error("Failed to get current validators", zap.Error(err))
return nil, err
Expand Down

0 comments on commit f12ae46

Please sign in to comment.