ACINQ / eclair

A scala implementation of the Lightning Network.
Apache License 2.0
1.24k stars 266 forks source link

Add `PushAmount` trait to track the reason behind a push #2846

Closed t-bast closed 4 months ago

t-bast commented 7 months ago

We have the ability to push some funds to our peer when opening a channel or splicing. This is generally used between LSPs and wallets to pay fees for on-the-fly funding, but can also be used for many other reasons.

We introduce a dedicated trait for that field instead of using a plain amount: that allows carrying more data than just an amount, and provides better insights of why some funds were pushed.

This is purely a refactoring at that point, without any logical changes.

NB: this builds on top of #2845

t-bast commented 4 months ago

We won't use push_amount in the latest version of on-the-fly funding.