* fix #1566 * fix #1566 Co-authored-by: Da Yu <dayu26@dadeMacBook-Pro.local>
This commit is contained in:
parent
58fe29d705
commit
9b598e5ec3
@ -22,6 +22,13 @@ var rewardsCmd = &cli.Command{
|
|||||||
var rewardsRedeemCmd = &cli.Command{
|
var rewardsRedeemCmd = &cli.Command{
|
||||||
Name: "redeem",
|
Name: "redeem",
|
||||||
Usage: "Redeem block rewards",
|
Usage: "Redeem block rewards",
|
||||||
|
Flags: []cli.Flag{
|
||||||
|
&cli.Int64Flag{
|
||||||
|
Name: "gas-limit",
|
||||||
|
Usage: "set gas limit",
|
||||||
|
Value: 100000,
|
||||||
|
},
|
||||||
|
},
|
||||||
Action: func(cctx *cli.Context) error {
|
Action: func(cctx *cli.Context) error {
|
||||||
nodeApi, closer, err := lcli.GetStorageMinerAPI(cctx)
|
nodeApi, closer, err := lcli.GetStorageMinerAPI(cctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -59,12 +66,14 @@ var rewardsRedeemCmd = &cli.Command{
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gasLimit := cctx.Int64("gas-limit")
|
||||||
|
|
||||||
smsg, err := api.MpoolPushMessage(ctx, &types.Message{
|
smsg, err := api.MpoolPushMessage(ctx, &types.Message{
|
||||||
To: maddr,
|
To: maddr,
|
||||||
From: mi.Owner,
|
From: mi.Owner,
|
||||||
Value: types.NewInt(0),
|
Value: types.NewInt(0),
|
||||||
GasPrice: types.NewInt(1),
|
GasPrice: types.NewInt(1),
|
||||||
GasLimit: 100000,
|
GasLimit: gasLimit,
|
||||||
Method: builtin.MethodsMiner.WithdrawBalance,
|
Method: builtin.MethodsMiner.WithdrawBalance,
|
||||||
Params: params,
|
Params: params,
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user