]> git.bitcoin.ninja Git - rust-lightning/commit
Expose `skimmed_fee_msat` in `PaymentForwarded`
authorElias Rohrer <dev@tnull.de>
Mon, 29 Jan 2024 15:16:08 +0000 (16:16 +0100)
committerElias Rohrer <dev@tnull.de>
Thu, 1 Feb 2024 08:21:15 +0000 (09:21 +0100)
commit96445880f6401d178893a3cec40fe26ebc755a30
tree50c6fbea518cfaaaceefaa05b377b729be081802
parent8e472669a1326d13424f3ebde40b6b6ff4e0a94d
Expose `skimmed_fee_msat` in `PaymentForwarded`

We generally allow routing nodes to forward less than the expected HTLC
amount, if the receiver knowingly accepts this and claims the
underpaying HTLC (see `ChannelConfig::accept_underpaying_htlcs`). This
use case is in particular useful for the LSPS2/JIT channel setting where
the intial underpaying HTLC pays for the channel open.

While we previously exposed the withheld amount as
`PaymentClaimable::counterparty_skimmed_fee_msat` on the receiver side,
we did not individually provide it on the forwarding node's side.
Here, we therefore expose this additionally withheld amount via
`PaymentForwarded::skimmed_fee_msat`.
lightning/src/events/mod.rs
lightning/src/ln/chanmon_update_fail_tests.rs
lightning/src/ln/channel.rs
lightning/src/ln/channelmanager.rs
lightning/src/ln/functional_test_utils.rs
lightning/src/ln/functional_tests.rs