tlnchannel: fix included_htlcs - electrum - Electrum Bitcoin wallet (HTM) git clone https://git.parazyd.org/electrum (DIR) Log (DIR) Files (DIR) Refs (DIR) Submodules --- (DIR) commit 5b7ce98ab2d97b43fa90f9bbfc6faa3820d8e512 (DIR) parent bb35e330fb47cf3ec46d4aadb7ff50167539faa9 (HTM) Author: SomberNight <somber.night@protonmail.com> Date: Fri, 27 Mar 2020 19:06:30 +0100 lnchannel: fix included_htlcs Diffstat: M electrum/lnchannel.py | 2 +- M electrum/lnutil.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) --- (DIR) diff --git a/electrum/lnchannel.py b/electrum/lnchannel.py t@@ -746,7 +746,7 @@ class Channel(Logger): ctn = self.get_oldest_unrevoked_ctn(subject) feerate = self.get_feerate(subject, ctn) conf = self.config[subject] - if (subject, direction) in [(REMOTE, RECEIVED), (LOCAL, SENT)]: + if direction == RECEIVED: weight = HTLC_SUCCESS_WEIGHT else: weight = HTLC_TIMEOUT_WEIGHT (DIR) diff --git a/electrum/lnutil.py b/electrum/lnutil.py t@@ -531,8 +531,8 @@ class HTLCOwner(IntFlag): return HTLCOwner(-self) class Direction(IntFlag): - SENT = -1 - RECEIVED = 1 + SENT = -1 # in the context of HTLCs: "offered" HTLCs + RECEIVED = 1 # in the context of HTLCs: "received" HTLCs SENT = Direction.SENT RECEIVED = Direction.RECEIVED