Refactor HTLCForwardInfo::AddHTLC for intercept forwards
authorValentine Wallace <vwallace@protonmail.com>
Fri, 4 Nov 2022 16:28:36 +0000 (12:28 -0400)
committerValentine Wallace <vwallace@protonmail.com>
Tue, 8 Nov 2022 20:48:32 +0000 (15:48 -0500)
commit582b827a4d3651aeb4002d4c357cdd8156e97c89
treec734bc7879d587d8641b5cce16a8c0f4f73e46e1
parent505102dc212df338091d8448c13b06f477170998
Refactor HTLCForwardInfo::AddHTLC for intercept forwards

In upcoming commit(s), we'll want to store intercepted HTLC forwards in
ChannelManager before the user signals that they should be forwarded.  It
wouldn't make sense to store a HTLCForwardInfo as-is because the FailHTLC
variant doesn't make sense, so we refactor out the ::AddHTLC contents into its
own struct for storage.

Co-authored-by: John Cantrell <johncantrell97@gmail.com>
Co-authored-by: Valentine Wallace <vwallace@protonmail.com>
lightning/src/ln/channelmanager.rs
lightning/src/ln/onion_route_tests.rs