Skip to content

Commit e8f6da8

Browse files
committed
fixes
1 parent eb57b8a commit e8f6da8

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

client/client.go

+3
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,9 @@ func (c *client) Start(ctx context.Context, execPath string, opts ...OpOption) (
146146
if ret.customNodeConfigs != nil {
147147
req.CustomNodeConfigs = ret.customNodeConfigs
148148
}
149+
if ret.walletPrivateKey != "" {
150+
req.WalletPrivateKey = ret.walletPrivateKey
151+
}
149152
req.ReassignPortsIfUsed = &ret.reassignPortsIfUsed
150153
req.DynamicPorts = &ret.dynamicPorts
151154

local/blockchain.go

+6-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package local
66
import (
77
"context"
88
"encoding/base64"
9+
"encoding/hex"
910
"errors"
1011
"fmt"
1112
"os"
@@ -325,7 +326,6 @@ func (ln *localNetwork) installCustomChains(
325326
subnetSpecsMap[*chainSpec.SubnetID] = subnetSpec
326327
}
327328
}
328-
329329
// if no participants are given for a new subnet, assume all nodes should be participants
330330
allNodeNames := maps.Keys(ln.nodes)
331331
sort.Strings(allNodeNames)
@@ -354,7 +354,6 @@ func (ln *localNetwork) installCustomChains(
354354
if err := ln.healthy(ctx); err != nil {
355355
return nil, err
356356
}
357-
358357
// just ensure all nodes are primary validators (so can be subnet validators)
359358
if err := ln.addPrimaryValidators(ctx, platformCli, w); err != nil {
360359
return nil, err
@@ -837,7 +836,11 @@ func newWallet(
837836
if walletPrivateKey == "" {
838837
privateKey = genesis.EWOQKey
839838
} else {
840-
if privateKey, err = secp256k1.ToPrivateKey([]byte(walletPrivateKey)); err != nil {
839+
walletPrivateKeyBytes, err := hex.DecodeString(walletPrivateKey)
840+
if err != nil {
841+
return nil, err
842+
}
843+
if privateKey, err = secp256k1.ToPrivateKey([]byte(walletPrivateKeyBytes)); err != nil {
841844
return nil, err
842845
}
843846
}

0 commit comments

Comments
 (0)