From 157e05295816ada7375818eb20d3aa4e3f746ca0 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Tue, 27 Feb 2018 22:12:19 -0800 Subject: [PATCH] htlcswitch: add the incoming payment amount to the htlcPacket MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- htlcswitch/packet.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/htlcswitch/packet.go b/htlcswitch/packet.go index 262826b0..cdaccedb 100644 --- a/htlcswitch/packet.go +++ b/htlcswitch/packet.go @@ -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