diff --git a/cmd/lotus-storage-miner/market.go b/cmd/lotus-storage-miner/market.go index 977ae22de..dd99a375c 100644 --- a/cmd/lotus-storage-miner/market.go +++ b/cmd/lotus-storage-miner/market.go @@ -169,7 +169,11 @@ var getAskCmd = &cli.Command{ return err } - rem := time.Second * time.Duration((ask.Expiry-miningBaseTs.Height())*build.BlockDelay) + dlt := ask.Expiry - miningBaseTs.Height() + rem := "" + if dlt > 0 { + rem = (time.Second * time.Duration(dlt*build.BlockDelay)).String() + } fmt.Fprintf(w, "%s\t%s\t%s\t%d\t%s\t%d\n", ask.Price, types.SizeStr(types.NewInt(uint64(ask.MinPieceSize))), types.SizeStr(types.NewInt(uint64(ask.MaxPieceSize))), ask.Expiry, rem, ask.SeqNo)