@@ -2166,6 +2166,31 @@ var updateChannelPolicyCommand = cli.Command{
21662166 "0.000001 (millionths). Can not be set at " +
21672167 "the same time as fee_rate" ,
21682168 },
2169+ cli.Int64Flag {
2170+ Name : "inbound_base_fee_msat" ,
2171+ Usage : "the base inbound fee in milli-satoshis that " +
2172+ "will be charged for each forwarded HTLC, " +
2173+ "regardless of payment size. Its value must " +
2174+ "be zero or negative - it is a discount " +
2175+ "for using a particular incoming channel. " +
2176+ "Note that forwards will be rejected if the " +
2177+ "discount exceeds the outbound fee " +
2178+ "(forward at a loss), and lead to " +
2179+ "penalization by the sender" ,
2180+ },
2181+ cli.Int64Flag {
2182+ Name : "inbound_fee_rate_ppm" ,
2183+ Usage : "the inbound fee rate that will be charged " +
2184+ "proportionally based on the value of each " +
2185+ "forwarded HTLC and the outbound fee. Fee " +
2186+ "rate is expressed in parts per million and " +
2187+ "must be zero or negative - it is a discount " +
2188+ "for using a particular incoming channel." +
2189+ "Note that forwards will be rejected if the " +
2190+ "discount exceeds the outbound fee " +
2191+ "(forward at a loss), and lead to " +
2192+ "penalization by the sender" ,
2193+ },
21692194 cli.Uint64Flag {
21702195 Name : "time_lock_delta" ,
21712196 Usage : "the CLTV delta that will be applied to all " +
@@ -2318,10 +2343,26 @@ func updateChannelPolicy(ctx *cli.Context) error {
23182343 }
23192344 }
23202345
2346+ inboundBaseFeeMsat := ctx .Int64 ("inbound_base_fee_msat" )
2347+ if inboundBaseFeeMsat < math .MinInt32 ||
2348+ inboundBaseFeeMsat > 0 {
2349+
2350+ return errors .New ("inbound_base_fee_msat out of range" )
2351+ }
2352+
2353+ inboundFeeRatePpm := ctx .Int64 ("inbound_fee_rate_ppm" )
2354+ if inboundFeeRatePpm < math .MinInt32 ||
2355+ inboundFeeRatePpm > 0 {
2356+
2357+ return errors .New ("inbound_fee_rate_ppm out of range" )
2358+ }
2359+
23212360 req := & lnrpc.PolicyUpdateRequest {
2322- BaseFeeMsat : baseFee ,
2323- TimeLockDelta : uint32 (timeLockDelta ),
2324- MaxHtlcMsat : ctx .Uint64 ("max_htlc_msat" ),
2361+ BaseFeeMsat : baseFee ,
2362+ TimeLockDelta : uint32 (timeLockDelta ),
2363+ MaxHtlcMsat : ctx .Uint64 ("max_htlc_msat" ),
2364+ InboundBaseFeeMsat : int32 (inboundBaseFeeMsat ),
2365+ InboundFeeRatePpm : int32 (inboundFeeRatePpm ),
23252366 }
23262367
23272368 if ctx .IsSet ("min_htlc_msat" ) {
0 commit comments