Bootstrap storageminer with full node

This commit is contained in:
Łukasz Magiera 2019-08-02 18:37:42 +02:00 committed by whyrusleeping
parent b65041cac1
commit 37a7ee08ec

View File

@ -80,6 +80,17 @@ var runCmd = &cli.Command{
return err
}
// Bootstrap with full node
remoteAddrs, err := nodeApi.NetAddrsListen(ctx)
if err != nil {
return err
}
// TODO: Hello won't disconnect us because it only calls close in HandleStream when genesis doesn't match
if err := minerapi.NetConnect(ctx, remoteAddrs); err != nil {
return err
}
log.Infof("Remote version %s", v)
rpcServer := jsonrpc.NewServer()