connect miner node to its full node???
This commit is contained in:
parent
e8f037cac8
commit
d4f883c1b0
@ -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 *impl.FullNodeAPI, fcid cid.Cid) *cid.Cid {
|
||||||
//func startDeal(ctx context.Context, minerActorAddr address.Address, client api.FullNodeAPI, fcid cid.Cid) *cid.Cid {
|
addr, err := client.WalletDefaultAddress(ctx)
|
||||||
addr, _ := client.WalletDefaultAddress(ctx)
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
|
||||||
deal, err := client.ClientStartDeal(ctx, &api.StartDealParams{
|
deal, err := client.ClientStartDeal(ctx, &api.StartDealParams{
|
||||||
Data: &storagemarket.DataRef{Root: fcid},
|
Data: &storagemarket.DataRef{Root: fcid},
|
||||||
|
@ -379,12 +379,16 @@ func prepareMiner(t *TestEnvironment) (*Node, error) {
|
|||||||
return err1
|
return err1
|
||||||
}
|
}
|
||||||
|
|
||||||
/*// Bootstrap with full node
|
remoteAddrs, err := n.fullApi.NetAddrsListen(ctx)
|
||||||
remoteAddrs, err := tnd.NetAddrsListen(ctx)
|
if err != nil {
|
||||||
require.NoError(t, err)
|
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 {
|
n.MineOne = func(ctx context.Context, cb func(bool)) error {
|
||||||
select {
|
select {
|
||||||
case mineBlock <- cb:
|
case mineBlock <- cb:
|
||||||
|
Loading…
Reference in New Issue
Block a user