give miners the ability to select different sector sizes
This commit is contained in:
committed by
Łukasz Magiera
parent
eeca3d86df
commit
4890f577f5
@@ -49,6 +49,11 @@ var initCmd = &cli.Command{
|
||||
Aliases: []string{"o"},
|
||||
Usage: "owner key to use",
|
||||
},
|
||||
&cli.Uint64Flag{
|
||||
Name: "sector-size",
|
||||
Usage: "specify sector size to use",
|
||||
Value: build.SectorSizes[0],
|
||||
},
|
||||
},
|
||||
Action: func(cctx *cli.Context) error {
|
||||
log.Info("Initializing lotus storage miner")
|
||||
@@ -276,6 +281,8 @@ func createStorageMiner(ctx context.Context, api api.FullNode, peerid peer.ID, c
|
||||
return address.Undef, err
|
||||
}
|
||||
|
||||
ssize := cctx.Uint64("sector-size")
|
||||
|
||||
worker := owner
|
||||
if cctx.String("worker") != "" {
|
||||
worker, err = address.NewFromString(cctx.String("worker"))
|
||||
@@ -295,7 +302,7 @@ func createStorageMiner(ctx context.Context, api api.FullNode, peerid peer.ID, c
|
||||
params, err := actors.SerializeParams(&actors.CreateStorageMinerParams{
|
||||
Owner: owner,
|
||||
Worker: worker,
|
||||
SectorSize: types.NewInt(build.SectorSize),
|
||||
SectorSize: ssize,
|
||||
PeerID: peerid,
|
||||
})
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user