htlcswitch/switch: log successfully forwarded HTLCs

This commit is contained in:
cryptagoras 2020-05-10 01:52:20 +03:00
parent 30e0dd7311
commit 0f734b769e

@ -1190,6 +1190,11 @@ func (s *Switch) handlePacketForward(packet *htlcPacket) error {
// fully settles? // fully settles?
localHTLC := packet.incomingChanID == sourceHop localHTLC := packet.incomingChanID == sourceHop
if !localHTLC { 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.fwdEventMtx.Lock()
s.pendingFwdingEvents = append( s.pendingFwdingEvents = append(
s.pendingFwdingEvents, s.pendingFwdingEvents,