diff --git a/electrum/lnchannel.py b/electrum/lnchannel.py index 4c89b9a81..b0e45cd18 100644 --- a/electrum/lnchannel.py +++ b/electrum/lnchannel.py @@ -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 diff --git a/electrum/lnutil.py b/electrum/lnutil.py index 03d6cfa6e..a7aa113af 100644 --- a/electrum/lnutil.py +++ b/electrum/lnutil.py @@ -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