connect miner node to its full node???

This commit is contained in:
Anton Evangelatov 2020-06-24 15:40:30 +02:00
parent e8f037cac8
commit d4f883c1b0
2 changed files with 13 additions and 7 deletions

View File

@ -189,8 +189,10 @@ func collectClientsAddrs(t *TestEnvironment, ctx context.Context, clients int) (
}
func startDeal(ctx context.Context, minerActorAddr address.Address, client *impl.FullNodeAPI, fcid cid.Cid) *cid.Cid {
//func startDeal(ctx context.Context, minerActorAddr address.Address, client api.FullNodeAPI, fcid cid.Cid) *cid.Cid {
addr, _ := client.WalletDefaultAddress(ctx)
addr, err := client.WalletDefaultAddress(ctx)
if err != nil {
panic(err)
}
deal, err := client.ClientStartDeal(ctx, &api.StartDealParams{
Data: &storagemarket.DataRef{Root: fcid},

View File

@ -379,12 +379,16 @@ func prepareMiner(t *TestEnvironment) (*Node, error) {
return err1
}
/*// Bootstrap with full node
remoteAddrs, err := tnd.NetAddrsListen(ctx)
require.NoError(t, err)
remoteAddrs, err := n.fullApi.NetAddrsListen(ctx)
if err != nil {
panic(err)
}
err = n.minerApi.NetConnect(ctx, remoteAddrs)
if err != nil {
panic(err)
}
err = minerapi.NetConnect(ctx, remoteAddrs)
require.NoError(t, err)*/
n.MineOne = func(ctx context.Context, cb func(bool)) error {
select {
case mineBlock <- cb: