fix: miner: init miner's with 32GiB sectors by default
This commit is contained in:
parent
d8441b134a
commit
27030aa1e8
@ -90,7 +90,6 @@ var initCmd = &cli.Command{
|
|||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "sector-size",
|
Name: "sector-size",
|
||||||
Usage: "specify sector size to use",
|
Usage: "specify sector size to use",
|
||||||
Value: units.BytesSize(float64(abi.SectorSize(2048))),
|
|
||||||
},
|
},
|
||||||
&cli.StringSliceFlag{
|
&cli.StringSliceFlag{
|
||||||
Name: "pre-sealed-sectors",
|
Name: "pre-sealed-sectors",
|
||||||
@ -129,11 +128,18 @@ var initCmd = &cli.Command{
|
|||||||
Action: func(cctx *cli.Context) error {
|
Action: func(cctx *cli.Context) error {
|
||||||
log.Info("Initializing lotus miner")
|
log.Info("Initializing lotus miner")
|
||||||
|
|
||||||
sectorSizeInt, err := units.RAMInBytes(cctx.String("sector-size"))
|
ssize, err := abi.RegisteredSealProof_StackedDrg32GiBV1.SectorSize()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return xerrors.Errorf("failed to calculate default sector size: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if cctx.IsSet("sector-size") {
|
||||||
|
sectorSizeInt, err := units.RAMInBytes(cctx.String("sector-size"))
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
ssize = abi.SectorSize(sectorSizeInt)
|
||||||
}
|
}
|
||||||
ssize := abi.SectorSize(sectorSizeInt)
|
|
||||||
|
|
||||||
gasPrice, err := types.BigFromString(cctx.String("gas-premium"))
|
gasPrice, err := types.BigFromString(cctx.String("gas-premium"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user