lncli: add i_know_what_i_am_doing flag to abandonchannel
This commit is contained in:
parent
2e9dd0bcf2
commit
3b712bf722
@ -1118,7 +1118,9 @@ var abandonChannelCommand = cli.Command{
|
||||
summary. This method can be used to get rid of permanently unusable
|
||||
channels due to bugs fixed in newer versions of lnd.
|
||||
|
||||
Only available when lnd is built in debug mode.
|
||||
Only available when lnd is built in debug mode. The flag
|
||||
--i_know_what_im_doing can be set to override the debug/dev mode
|
||||
requirement.
|
||||
|
||||
To view which funding_txids/output_indexes can be used for this command,
|
||||
see the channel_point values within the listchannels command output.
|
||||
@ -1134,6 +1136,16 @@ var abandonChannelCommand = cli.Command{
|
||||
Usage: "the output index for the funding output of the funding " +
|
||||
"transaction",
|
||||
},
|
||||
cli.BoolFlag{
|
||||
Name: "i_know_what_i_am_doing",
|
||||
Usage: "override the requirement for lnd needing to " +
|
||||
"be in dev/debug mode to use this command; " +
|
||||
"when setting this the user attests that " +
|
||||
"they know the danger of using this command " +
|
||||
"on channels and that doing so can lead to " +
|
||||
"loss of funds if the channel funding TX " +
|
||||
"ever confirms (or was confirmed)",
|
||||
},
|
||||
},
|
||||
Action: actionDecorator(abandonChannel),
|
||||
}
|
||||
@ -1156,6 +1168,7 @@ func abandonChannel(ctx *cli.Context) error {
|
||||
|
||||
req := &lnrpc.AbandonChannelRequest{
|
||||
ChannelPoint: channelPoint,
|
||||
IKnowWhatIAmDoing: ctx.Bool("i_know_what_i_am_doing"),
|
||||
}
|
||||
|
||||
resp, err := client.AbandonChannel(ctxc, req)
|
||||
|
Loading…
Reference in New Issue
Block a user