mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-24 07:46:07 +02:00
lncli: add create_missing_edge
This commit is contained in:
parent
f1299fdd57
commit
aa2ddf77d0
@ -2359,6 +2359,21 @@ var updateChannelPolicyCommand = cli.Command{
|
|||||||
"channels will be updated. Takes the form of " +
|
"channels will be updated. Takes the form of " +
|
||||||
"txid:output_index",
|
"txid:output_index",
|
||||||
},
|
},
|
||||||
|
cli.BoolFlag{
|
||||||
|
Name: "create_missing_edge",
|
||||||
|
Usage: "Under unknown circumstances a channel can " +
|
||||||
|
"exist with a missing edge in the graph " +
|
||||||
|
"database. This can cause an 'edge not " +
|
||||||
|
"found' error when calling `getchaninfo` " +
|
||||||
|
"and/or cause the default channel policy to " +
|
||||||
|
"be used during forwards. Setting this flag " +
|
||||||
|
"will recreate the edge if not found, " +
|
||||||
|
"allowing updating this channel policy and " +
|
||||||
|
"fixing the missing edge problem for this " +
|
||||||
|
"channel permanently. For fields not set in " +
|
||||||
|
"this command, the default policy will be " +
|
||||||
|
"created.",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Action: actionDecorator(updateChannelPolicy),
|
Action: actionDecorator(updateChannelPolicy),
|
||||||
}
|
}
|
||||||
@ -2518,11 +2533,14 @@ func updateChannelPolicy(ctx *cli.Context) error {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
createMissingEdge := ctx.Bool("create_missing_edge")
|
||||||
|
|
||||||
req := &lnrpc.PolicyUpdateRequest{
|
req := &lnrpc.PolicyUpdateRequest{
|
||||||
BaseFeeMsat: baseFee,
|
BaseFeeMsat: baseFee,
|
||||||
TimeLockDelta: uint32(timeLockDelta),
|
TimeLockDelta: uint32(timeLockDelta),
|
||||||
MaxHtlcMsat: ctx.Uint64("max_htlc_msat"),
|
MaxHtlcMsat: ctx.Uint64("max_htlc_msat"),
|
||||||
InboundFee: inboundFee,
|
InboundFee: inboundFee,
|
||||||
|
CreateMissingEdge: createMissingEdge,
|
||||||
}
|
}
|
||||||
|
|
||||||
if ctx.IsSet("min_htlc_msat") {
|
if ctx.IsSet("min_htlc_msat") {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user