commit 05a191cc6a544adf625c70454540c8b79ea5ed7c
parent dd0a93abd5fec2f2d06882502c78ee576b7d7def
Author: ThomasV <thomasv@electrum.org>
Date: Mon, 9 Mar 2020 19:10:03 +0100
(minor) simplification
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/electrum/lnchannel.py b/electrum/lnchannel.py
@@ -806,7 +806,7 @@ class Channel(Logger):
def make_commitment(self, subject, this_point, ctn) -> PartialTransaction:
assert type(subject) is HTLCOwner
feerate = self.get_feerate(subject, ctn)
- other = REMOTE if LOCAL == subject else LOCAL
+ other = subject.inverted()
local_msat = self.balance(subject, ctx_owner=subject, ctn=ctn)
remote_msat = self.balance(other, ctx_owner=subject, ctn=ctn)
received_htlcs = self.hm.htlcs_by_direction(subject, SENT if subject == LOCAL else RECEIVED, ctn).values()