mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-07 03:32:37 +02:00
lncli: remove possibility to discard mission control from loadmc
This can already be done with resetmc and was only included here because loadmc was used in a different context.
This commit is contained in:
@@ -115,10 +115,6 @@ var loadMissionControlCommand = cli.Command{
|
|||||||
Name: "mcdatapath",
|
Name: "mcdatapath",
|
||||||
Usage: "The path to the querymc output file (json).",
|
Usage: "The path to the querymc output file (json).",
|
||||||
},
|
},
|
||||||
cli.BoolFlag{
|
|
||||||
Name: "discard",
|
|
||||||
Usage: "Discards current mission control data.",
|
|
||||||
},
|
|
||||||
cli.StringFlag{
|
cli.StringFlag{
|
||||||
Name: "timeoffset",
|
Name: "timeoffset",
|
||||||
Usage: "Time offset to add to all timestamps. " +
|
Usage: "Time offset to add to all timestamps. " +
|
||||||
@@ -171,22 +167,6 @@ func loadMissionControl(ctx *cli.Context) error {
|
|||||||
|
|
||||||
client := routerrpc.NewRouterClient(conn)
|
client := routerrpc.NewRouterClient(conn)
|
||||||
|
|
||||||
// We discard mission control data if requested.
|
|
||||||
if ctx.Bool("discard") {
|
|
||||||
if !promptForConfirmation("This will discard all current " +
|
|
||||||
"mission control data in the database (yes/no): ") {
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
_, err = client.ResetMissionControl(
|
|
||||||
rpcCtx, &routerrpc.ResetMissionControlRequest{},
|
|
||||||
)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add a time offset to all timestamps if requested.
|
// Add a time offset to all timestamps if requested.
|
||||||
timeOffset := ctx.String("timeoffset")
|
timeOffset := ctx.String("timeoffset")
|
||||||
if timeOffset != "" {
|
if timeOffset != "" {
|
||||||
|
Reference in New Issue
Block a user