Add gas-feecap flag for cmd sectors renew
This commit is contained in:
parent
9ee80fd1db
commit
e09cdc45a7
@ -592,7 +592,7 @@ var sectorsRenewCmd = &cli.Command{
|
|||||||
},
|
},
|
||||||
&cli.StringFlag{
|
&cli.StringFlag{
|
||||||
Name: "sector-file",
|
Name: "sector-file",
|
||||||
Usage: "Provide a file containing one sector number in each line, ignoring above selecting criteria",
|
Usage: "provide a file containing one sector number in each line, ignoring above selecting criteria",
|
||||||
},
|
},
|
||||||
&cli.Int64Flag{
|
&cli.Int64Flag{
|
||||||
Name: "extension",
|
Name: "extension",
|
||||||
@ -612,8 +612,18 @@ var sectorsRenewCmd = &cli.Command{
|
|||||||
Name: "really-do-it",
|
Name: "really-do-it",
|
||||||
Usage: "pass this flag to really renew sectors, otherwise will only print out json representation of parameters",
|
Usage: "pass this flag to really renew sectors, otherwise will only print out json representation of parameters",
|
||||||
},
|
},
|
||||||
|
&cli.StringFlag{
|
||||||
|
Name: "gas-feecap",
|
||||||
|
Usage: "pass this flag to avoid message congestion",
|
||||||
|
Value: "0",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Action: func(cctx *cli.Context) error {
|
Action: func(cctx *cli.Context) error {
|
||||||
|
gfc, err := types.BigFromString(cctx.String("gas-feecap"))
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
api, nCloser, err := lcli.GetFullNodeAPI(cctx)
|
api, nCloser, err := lcli.GetFullNodeAPI(cctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@ -849,11 +859,12 @@ var sectorsRenewCmd = &cli.Command{
|
|||||||
}
|
}
|
||||||
|
|
||||||
smsg, err := api.MpoolPushMessage(ctx, &types.Message{
|
smsg, err := api.MpoolPushMessage(ctx, &types.Message{
|
||||||
From: mi.Worker,
|
From: mi.Worker,
|
||||||
To: maddr,
|
To: maddr,
|
||||||
Method: miner.Methods.ExtendSectorExpiration,
|
Method: miner.Methods.ExtendSectorExpiration,
|
||||||
Value: big.Zero(),
|
Value: big.Zero(),
|
||||||
Params: sp,
|
GasFeeCap: gfc,
|
||||||
|
Params: sp,
|
||||||
}, nil)
|
}, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Errorf("mpool push message: %w", err)
|
return xerrors.Errorf("mpool push message: %w", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user