From d377ffafddc8f5d5b5771e9087157daf3b4cd2ab Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Tue, 27 Feb 2018 22:13:59 -0800 Subject: [PATCH] htlcswitch: populate the incoming+outgoing in the payment circuit --- htlcswitch/link.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htlcswitch/link.go b/htlcswitch/link.go index 89887a677..c0994d3fe 100644 --- a/htlcswitch/link.go +++ b/htlcswitch/link.go @@ -881,14 +881,16 @@ func (l *channelLink) handleDownStreamPkt(pkt *htlcPacket, isReProcess bool) { "local_log_index=%v, batch_size=%v", htlc.PaymentHash[:], index, l.batchCounter+1) - // Create circuit (remember the path) in order to forward settle/fail - // packet back. + // Create circuit (remember the path) in order to forward + // settle/fail packet back. l.cfg.Switch.addCircuit(&PaymentCircuit{ PaymentHash: htlc.PaymentHash, IncomingChanID: pkt.incomingChanID, IncomingHTLCID: pkt.incomingHTLCID, + IncomingAmt: pkt.incomingHtlcAmt, OutgoingChanID: l.ShortChanID(), OutgoingHTLCID: index, + OutgoingAmt: htlc.Amount, ErrorEncrypter: pkt.obfuscator, })