Merge pull request #3018 from cryptagoras/log-htlcsuccess

htlcswitch/switch: log successfully forwarded HTLCs
This commit is contained in:
Olaoluwa Osuntokun 2020-05-11 17:55:45 -07:00 committed by GitHub
commit 704ce02712
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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,