@@ -16,6 +16,7 @@ import (
16
16
"time"
17
17
18
18
"github.com/ava-labs/avalanchego/vms/platformvm/reward"
19
+ "github.com/ethereum/go-ethereum/log"
19
20
20
21
"github.com/ava-labs/avalanchego/vms/avm"
21
22
"github.com/ava-labs/avalanchego/vms/components/avax"
@@ -283,12 +284,12 @@ func (ln *localNetwork) installCustomChains(
283
284
preloadTXs = append (preloadTXs , subnetID )
284
285
}
285
286
}
286
-
287
+ ln . log . Info ( logging . Blue . Wrap ( logging . Bold . Wrap ( "create wallet" )))
287
288
w , err := newWallet (ctx , clientURI , preloadTXs , ln .walletPrivateKey )
288
289
if err != nil {
289
290
return nil , err
290
291
}
291
-
292
+ ln . log . Info ( logging . Blue . Wrap ( logging . Bold . Wrap ( " wallet is ready" )))
292
293
// get subnet specs for all new subnets to create
293
294
// for the list of requested blockchains, we take those that have undefined subnet id
294
295
// and use the provided subnet spec. if not given, use an empty default subnet spec
@@ -845,12 +846,15 @@ func newWallet(
845
846
}
846
847
}
847
848
kc := secp256k1fx .NewKeychain (privateKey )
849
+ log .Info ("aboout to fetch state" , uri , kc .Addresses ())
848
850
primaryAVAXState , err := primary .FetchState (ctx , uri , kc .Addresses ())
849
851
if err != nil {
850
852
return nil , err
851
853
}
854
+ log .Info ("primaryAVAXState" , primaryAVAXState )
852
855
pCTX , xCTX , utxos := primaryAVAXState .PCTX , primaryAVAXState .XCTX , primaryAVAXState .UTXOs
853
856
pClient := platformvm .NewClient (uri )
857
+ log .Info ("pClient using uri" , uri )
854
858
pTXs := make (map [ids.ID ]* txs.Tx )
855
859
for _ , id := range preloadTXs {
856
860
txBytes , err := pClient .GetTx (ctx , id )
@@ -873,6 +877,7 @@ func newWallet(
873
877
w .pSigner = psigner .New (kc , w .pBackend )
874
878
w .pWallet = p .NewWallet (w .pBuilder , w .pSigner , pClient , w .pBackend )
875
879
880
+ log .Info ("pWallet" , w .pWallet )
876
881
xBackend := x .NewBackend (xCTX , xUTXOs )
877
882
xBuilder := xbuilder .New (kc .Addresses (), xCTX , xBackend )
878
883
xSigner := xsigner .New (kc , xBackend )
0 commit comments