Skip to content

Commit

Permalink
multi/refactor: clarify blinded payment fee rate field name
Browse files Browse the repository at this point in the history
  • Loading branch information
carlaKC committed Mar 27, 2024
1 parent 4a93f4d commit 0aeb7c4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion lnrpc/routerrpc/router_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ func unmarshalBlindedPayment(rpcPayment *lnrpc.BlindedPaymentPath) (
BlindedPath: path,
CltvExpiryDelta: uint16(rpcPayment.TotalCltvDelta),
BaseFee: uint32(rpcPayment.BaseFeeMsat),
ProportionalFee: uint32(
ProportionalFeeRate: uint32(
rpcPayment.ProportionalFeeMsat,
),
HtlcMinimum: rpcPayment.HtlcMinMsat,
Expand Down
8 changes: 4 additions & 4 deletions routing/blinding.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ type BlindedPayment struct {
// blinded path.
BaseFee uint32

// ProportionalFee is the aggregated proportional fee for payments
// made over the blinded path.
ProportionalFee uint32
// ProportionalFeeRate is the aggregated proportional fee rate for
// payments made over the blinded path.
ProportionalFeeRate uint32

// CltvExpiryDelta is the total expiry delta for the blinded path. Note
// this does not include the final cltv delta for the receiving node
Expand Down Expand Up @@ -122,7 +122,7 @@ func (b *BlindedPayment) toRouteHints() RouteHints {
MaxHTLC: lnwire.MilliSatoshi(b.HtlcMaximum),
FeeBaseMSat: lnwire.MilliSatoshi(b.BaseFee),
FeeProportionalMillionths: lnwire.MilliSatoshi(
b.ProportionalFee,
b.ProportionalFeeRate,
),
ToNodePubKey: func() route.Vertex {
return route.NewVertex(
Expand Down
12 changes: 6 additions & 6 deletions routing/blinding_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,12 @@ func TestBlindedPaymentToHints(t *testing.T) {
{},
},
},
BaseFee: baseFee,
ProportionalFee: ppmFee,
CltvExpiryDelta: cltvDelta,
HtlcMinimum: htlcMin,
HtlcMaximum: htlcMax,
Features: features,
BaseFee: baseFee,
ProportionalFeeRate: ppmFee,
CltvExpiryDelta: cltvDelta,
HtlcMinimum: htlcMin,
HtlcMaximum: htlcMax,
Features: features,
}
require.Nil(t, blindedPayment.toRouteHints())

Expand Down

0 comments on commit 0aeb7c4

Please sign in to comment.