diff --git a/cli/mpool.go b/cli/mpool.go index e6f0bacc7..50a4485d2 100644 --- a/cli/mpool.go +++ b/cli/mpool.go @@ -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)