add --really-do-it flag to mpool clear command
This commit is contained in:
parent
087955e927
commit
3debf005a8
@ -92,6 +92,10 @@ var mpoolClear = &cli.Command{
|
||||
Name: "local",
|
||||
Usage: "clear local messages only",
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "really-do-it",
|
||||
Usage: "must be specified for the action to take effect",
|
||||
},
|
||||
},
|
||||
Action: func(cctx *cli.Context) error {
|
||||
api, closer, err := GetFullNodeAPI(cctx)
|
||||
@ -100,6 +104,11 @@ var mpoolClear = &cli.Command{
|
||||
}
|
||||
defer closer()
|
||||
|
||||
really := cctx.Bool("really-do-it")
|
||||
if !really {
|
||||
return fmt.Errorf("--really-do-it must be specified for this action to have an effect; you have been warned.")
|
||||
}
|
||||
|
||||
local := cctx.Bool("local")
|
||||
|
||||
ctx := ReqContext(cctx)
|
||||
|
Loading…
Reference in New Issue
Block a user