Merge pull request #3018 from cryptagoras/log-htlcsuccess

htlcswitch/switch: log successfully forwarded HTLCs
This commit is contained in:
Olaoluwa Osuntokun authored and GitHub committed 2020-05-11 17:55:45 -07:00
commit 704ce02712
1 file changed
+5
+5
View File
@@ -1245,6 +1245,11 @@ func (s *Switch) handlePacketForward(packet *htlcPacket) error {
// fully settles?
localHTLC := packet.incomingChanID == hop.Source
if !localHTLC {
log.Infof("Forwarded HTLC(%x) of %v (fee: %v) "+
"from IncomingChanID(%v) to OutgoingChanID(%v)",
circuit.PaymentHash[:], circuit.OutgoingAmount,
circuit.IncomingAmount-circuit.OutgoingAmount,
circuit.Incoming.ChanID, circuit.Outgoing.ChanID)
s.fwdEventMtx.Lock()
s.pendingFwdingEvents = append(
s.pendingFwdingEvents,