mirror of
https://github.com/ACINQ/eclair.git
synced 2025-02-24 14:50:46 +01:00
We were previously directly creating onion payloads inside the various payment state machines and manipulating tlv fields. This was a layering violation that was somewhat ok because in most cases we only needed to create the onion payload for the recipient at the beginning of the payment flow and didn't need to modify it, except for a small change in the MPP case. This forced us to handle trampoline onions directly in the payment initiator and will not work for blinded payments, where we can only build the onion payload for the recipient after we've chosen the routes and how to split the amount. We clean this up by introducing payment recipients that abstract away the creation of onion payloads. This makes it much easier to integrate blinded payments. It also allows us to clean up the way we do trampoline payments and potentially support splitting across multiple trampoline routes (not included in this PR as this change isn't immediately needed). It also lets us simplify the MultiPartPaymentLifecycle FSM, by moving the logic of computing how much remains to be sent and what fee can be used to the route calculation component. |
||
---|---|---|
.. | ||
src | ||
eclair-cli | ||
pom.xml |