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
2024-05-14 00:21:26 +02:00
parent 87d5170dec
commit f62c00fe34
8 changed files with 1457 additions and 1322 deletions

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)