Skip to content

Commit 30982e9

Browse files
committed
add debug output tmp
1 parent 82fe6e9 commit 30982e9

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

local/blockchain.go

+7-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import (
1616
"time"
1717

1818
"github.com/ava-labs/avalanchego/vms/platformvm/reward"
19+
"github.com/ethereum/go-ethereum/log"
1920

2021
"github.com/ava-labs/avalanchego/vms/avm"
2122
"github.com/ava-labs/avalanchego/vms/components/avax"
@@ -283,12 +284,12 @@ func (ln *localNetwork) installCustomChains(
283284
preloadTXs = append(preloadTXs, subnetID)
284285
}
285286
}
286-
287+
ln.log.Info(logging.Blue.Wrap(logging.Bold.Wrap("create wallet")))
287288
w, err := newWallet(ctx, clientURI, preloadTXs, ln.walletPrivateKey)
288289
if err != nil {
289290
return nil, err
290291
}
291-
292+
ln.log.Info(logging.Blue.Wrap(logging.Bold.Wrap(" wallet is ready")))
292293
// get subnet specs for all new subnets to create
293294
// for the list of requested blockchains, we take those that have undefined subnet id
294295
// and use the provided subnet spec. if not given, use an empty default subnet spec
@@ -845,12 +846,15 @@ func newWallet(
845846
}
846847
}
847848
kc := secp256k1fx.NewKeychain(privateKey)
849+
log.Info("aboout to fetch state", uri, kc.Addresses())
848850
primaryAVAXState, err := primary.FetchState(ctx, uri, kc.Addresses())
849851
if err != nil {
850852
return nil, err
851853
}
854+
log.Info("primaryAVAXState", primaryAVAXState)
852855
pCTX, xCTX, utxos := primaryAVAXState.PCTX, primaryAVAXState.XCTX, primaryAVAXState.UTXOs
853856
pClient := platformvm.NewClient(uri)
857+
log.Info("pClient using uri", uri)
854858
pTXs := make(map[ids.ID]*txs.Tx)
855859
for _, id := range preloadTXs {
856860
txBytes, err := pClient.GetTx(ctx, id)
@@ -873,6 +877,7 @@ func newWallet(
873877
w.pSigner = psigner.New(kc, w.pBackend)
874878
w.pWallet = p.NewWallet(w.pBuilder, w.pSigner, pClient, w.pBackend)
875879

880+
log.Info("pWallet", w.pWallet)
876881
xBackend := x.NewBackend(xCTX, xUTXOs)
877882
xBuilder := xbuilder.New(kc.Addresses(), xCTX, xBackend)
878883
xSigner := xsigner.New(kc, xBackend)

0 commit comments

Comments
 (0)