TEMP: accept miner address from cli

This commit is contained in:
whyrusleeping 2019-08-16 12:39:09 -07:00
parent f7dc253669
commit b2d425b891
3 changed files with 7 additions and 2 deletions

View File

@ -56,6 +56,7 @@ func Call(ctx context.Context, cs *store.ChainStore, msg *types.Message, ts *typ
if ts == nil { if ts == nil {
ts = cs.GetHeaviestTipSet() ts = cs.GetHeaviestTipSet()
} }
state, err := cs.TipSetState(ts.Cids()) state, err := cs.TipSetState(ts.Cids())
if err != nil { if err != nil {
return nil, err return nil, err

View File

@ -3,6 +3,7 @@ package cli
import ( import (
"fmt" "fmt"
"github.com/filecoin-project/go-lotus/chain/address"
"gopkg.in/urfave/cli.v2" "gopkg.in/urfave/cli.v2"
) )
@ -25,8 +26,8 @@ var minerStart = &cli.Command{
ctx := ReqContext(cctx) ctx := ReqContext(cctx)
// TODO: this address needs to be the address of an actual miner // TODO: need to pull this from disk or something
maddr, err := api.WalletDefaultAddress(ctx) maddr, err := address.NewFromString(cctx.Args().First())
if err != nil { if err != nil {
return err return err
} }

View File

@ -2,6 +2,7 @@ package testing
import ( import (
"context" "context"
"fmt"
"io" "io"
"os" "os"
@ -80,6 +81,8 @@ func MakeGenesis(outFile string) func(bs dtypes.ChainBlockstore, w *wallet.Walle
return nil, err return nil, err
} }
fmt.Println("GENESIS MINER ADDRESS: ", gmc.MinerAddr.String())
f, err := os.OpenFile(outFile, os.O_CREATE|os.O_WRONLY, 0644) f, err := os.OpenFile(outFile, os.O_CREATE|os.O_WRONLY, 0644)
if err != nil { if err != nil {
return nil, err return nil, err