mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-30 02:21:08 +02:00
Merge pull request #8627 from feelancer21/inbound-fees-reject
lnrpc: rejects positive inbound fees by default
This commit is contained in:
14
rpcserver.go
14
rpcserver.go
@ -7109,6 +7109,20 @@ func (r *rpcServer) UpdateChannelPolicy(ctx context.Context,
|
||||
MaxTimeLockDelta)
|
||||
}
|
||||
|
||||
// By default, positive inbound fees are rejected.
|
||||
if !r.cfg.AcceptPositiveInboundFees {
|
||||
if req.InboundBaseFeeMsat > 0 {
|
||||
return nil, fmt.Errorf("positive values for inbound "+
|
||||
"base fee msat are not supported: %v",
|
||||
req.InboundBaseFeeMsat)
|
||||
}
|
||||
if req.InboundFeeRatePpm > 0 {
|
||||
return nil, fmt.Errorf("positive values for inbound "+
|
||||
"fee rate ppm are not supported: %v",
|
||||
req.InboundFeeRatePpm)
|
||||
}
|
||||
}
|
||||
|
||||
baseFeeMsat := lnwire.MilliSatoshi(req.BaseFeeMsat)
|
||||
feeSchema := routing.FeeSchema{
|
||||
BaseFee: baseFeeMsat,
|
||||
|
Reference in New Issue
Block a user