Merge pull request #5901 from Roasbeef/dedup-interceptor

Dedup interceptor
This commit is contained in:
Olaoluwa Osuntokun authored and GitHub committed 2021-10-28 17:44:49 -07:00
commit 66ca2a994b
4 files changed
+178 -4

No files matched your search

+5
View File
@@ -150,6 +150,11 @@ func (r *forwardInterceptor) holdAndForwardToClient(
htlc := forward.Packet()
inKey := htlc.IncomingCircuit
// Ignore already held htlcs.
if _, ok := r.holdForwards[inKey]; ok {
return nil
}
// First hold the forward, then send to client.
r.holdForwards[inKey] = forward
interceptionRequest := &ForwardHtlcInterceptRequest{