diff --git a/cli/state.go b/cli/state.go index 8de612128..7576f6f77 100644 --- a/cli/state.go +++ b/cli/state.go @@ -24,6 +24,7 @@ var stateCmd = &cli.Command{ stateGetActorCmd, stateLookupIDCmd, stateReplaySetCmd, + stateSectorSizeCmd, }, } @@ -334,3 +335,35 @@ var stateLookupIDCmd = &cli.Command{ return nil }, } + +var stateSectorSizeCmd = &cli.Command{ + Name: "sector-size", + Usage: "Look up miners sector size", + Action: func(cctx *cli.Context) error { + api, closer, err := GetFullNodeAPI(cctx) + if err != nil { + return err + } + defer closer() + + ctx := ReqContext(cctx) + + if !cctx.Args().Present() { + return fmt.Errorf("must pass address of actor to get") + } + + addr, err := address.NewFromString(cctx.Args().First()) + if err != nil { + return err + } + + ssize, err := api.StateMinerSectorSize(ctx, addr, nil) + if err != nil { + return err + } + + fmt.Printf("%d\n", ssize) + + return nil + }, +} diff --git a/miner/miner.go b/miner/miner.go index 98def0e07..cabee16fd 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -270,7 +270,7 @@ func (m *Miner) mineOne(ctx context.Context, addr address.Address, base *MiningB return nil, nil } - log.Infof("Time delta between now and our mining base: %ds", uint64(time.Now().Unix())-base.ts.MinTimestamp()) + log.Infof("Time delta between now and our mining base: %ds (nulls: %d)", uint64(time.Now().Unix())-base.ts.MinTimestamp(), base.nullRounds) ticket, err := m.computeTicket(ctx, addr, base) if err != nil {