commit 54f7755397f5c4a4ce3215ddad70f342f06cf9fe
parent 28a7d204ad6e8bfa503f9f8afe2b8f23cb16238e
Author: SomberNight <somber.night@protonmail.com>
Date: Thu, 11 Mar 2021 18:51:45 +0100
lnpeer.maybe_forward_htlc: add FIXME
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/electrum/lnpeer.py b/electrum/lnpeer.py
@@ -1343,6 +1343,9 @@ class Peer(Logger):
# Forward HTLC
# FIXME: there are critical safety checks MISSING here
+ # - for example; atm we forward first and then persist "forwarding_info",
+ # so if we segfault in-between and restart, we might forward an HTLC twice...
+ # (same for trampoline forwarding)
forwarding_enabled = self.network.config.get('lightning_forward_payments', False)
if not forwarding_enabled:
self.logger.info(f"forwarding is disabled. failing htlc.")