lnrpc: rejects positive inbound fees by default

Positive inbound are now rejected by default. The user can enable positive
inbound fees with the option 'accept-positive-inbound-fees'.
This commit is contained in:
feelancer21
2024-04-06 18:45:04 +02:00
parent 6377f98536
commit a2319e4313
5 changed files with 32 additions and 3 deletions

View File

@@ -2376,14 +2376,14 @@ func updateChannelPolicy(ctx *cli.Context) error {
inboundBaseFeeMsat := ctx.Int64("inbound_base_fee_msat")
if inboundBaseFeeMsat < math.MinInt32 ||
inboundBaseFeeMsat > 0 {
inboundBaseFeeMsat > math.MaxInt32 {
return errors.New("inbound_base_fee_msat out of range")
}
inboundFeeRatePpm := ctx.Int64("inbound_fee_rate_ppm")
if inboundFeeRatePpm < math.MinInt32 ||
inboundFeeRatePpm > 0 {
inboundFeeRatePpm > math.MaxInt32 {
return errors.New("inbound_fee_rate_ppm out of range")
}