multi: Inbound fees are retained when not provided
Fixes the problem that inbound base fee and fee rate are overwritten with 0 if they are not specified in PolicyUpdateRequest. This ensures backward compatibility with older rpc clients that do not yet support the inbound feature.
This commit is contained in:
8 files changed
+1457
-1322
No files matched your search
+1359
-1290
File diff suppressed because it is too large.
Load diff
+13
-2
@@ -4369,6 +4369,16 @@ message FeeReportResponse {
|
||||
uint64 month_fee_sum = 4;
|
||||
}
|
||||
|
||||
message InboundFee {
|
||||
// The inbound base fee charged regardless of the number of milli-satoshis
|
||||
// received in the channel. By default, only negative values are accepted.
|
||||
int32 base_fee_msat = 1;
|
||||
|
||||
// The effective inbound fee rate in micro-satoshis (parts per million).
|
||||
// By default, only negative values are accepted.
|
||||
int32 fee_rate_ppm = 2;
|
||||
}
|
||||
|
||||
message PolicyUpdateRequest {
|
||||
oneof scope {
|
||||
// If set, then this update applies to all currently active channels.
|
||||
@@ -4402,8 +4412,9 @@ message PolicyUpdateRequest {
|
||||
// If true, min_htlc_msat is applied.
|
||||
bool min_htlc_msat_specified = 8;
|
||||
|
||||
int32 inbound_base_fee_msat = 10;
|
||||
int32 inbound_fee_rate_ppm = 11;
|
||||
// Optional inbound fee. If unset, the previously set value will be
|
||||
// retained [EXPERIMENTAL].
|
||||
InboundFee inbound_fee = 10;
|
||||
}
|
||||
|
||||
enum UpdateFailure {
|
||||
|
||||
@@ -5297,6 +5297,21 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"lnrpcInboundFee": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"base_fee_msat": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"description": "The inbound base fee charged regardless of the number of milli-satoshis\nreceived in the channel. By default, only negative values are accepted."
|
||||
},
|
||||
"fee_rate_ppm": {
|
||||
"type": "integer",
|
||||
"format": "int32",
|
||||
"description": "The effective inbound fee rate in micro-satoshis (parts per million).\nBy default, only negative values are accepted."
|
||||
}
|
||||
}
|
||||
},
|
||||
"lnrpcInitiator": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
@@ -6585,13 +6600,9 @@
|
||||
"type": "boolean",
|
||||
"description": "If true, min_htlc_msat is applied."
|
||||
},
|
||||
"inbound_base_fee_msat": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"inbound_fee_rate_ppm": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
"inbound_fee": {
|
||||
"$ref": "#/definitions/lnrpcInboundFee",
|
||||
"description": "Optional inbound fee. If unset, the previously set value will be\nretained [EXPERIMENTAL]."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user