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:
feelancer21 committed 2024-05-22 20:48:42 +02:00
1 parent 87d5170dec
commit f62c00fe34
8 files changed
+1457 -1322

No files matched your search

+5 -3
View File
@@ -257,9 +257,11 @@ func updateChannelPolicy(ht *lntest.HarnessTest, hn *node.HarnessNode,
Scope: &lnrpc.PolicyUpdateRequest_ChanPoint{
ChanPoint: chanPoint,
},
MaxHtlcMsat: maxHtlc,
InboundBaseFeeMsat: inboundBaseFee,
InboundFeeRatePpm: inboundFeeRate,
MaxHtlcMsat: maxHtlc,
InboundFee: &lnrpc.InboundFee{
BaseFeeMsat: inboundBaseFee,
FeeRatePpm: inboundFeeRate,
},
}
hn.RPC.UpdateChannelPolicy(updateFeeReq)