htlcswitch: add the incoming payment amount to the htlcPacket

We’ll need this value within the link+switch in order to fully populate
the forwarding event that will be generated if this HTLC circuit is
successfully completed.
This commit is contained in:
Olaoluwa Osuntokun 2018-02-27 22:12:19 -08:00
parent 2b8cad2f08
commit 157e052958
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

@ -23,6 +23,14 @@ type htlcPacket struct {
// on the incoming channel.
incomingHTLCID uint64
// incomingHtlcAmt is the value of the *incoming* HTLC. This will be
// set by the link when it receives an incoming HTLC to be forwarded
// through the switch. Then the outgoing link will use this once it
// creates a full circuit add. This allows us to properly populate the
// forwarding event for this circuit/packet in the case the payment
// circuit is successful.
incomingHtlcAmt lnwire.MilliSatoshi
// outgoingHTLCID is the ID of the HTLC that we offered to the peer on the
// outgoing channel.
outgoingHTLCID uint64