From 0d84873a75b85f5f3a80985f6e4e3e9d324641de Mon Sep 17 00:00:00 2001 From: SomberNight Date: Fri, 2 Aug 2019 18:05:48 +0200 Subject: [PATCH] lnchannel: trivial clean-up --- electrum/lnchannel.py | 7 +------ electrum/lnpeer.py | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/electrum/lnchannel.py b/electrum/lnchannel.py index 2c9963244..2d53c1d64 100644 --- a/electrum/lnchannel.py +++ b/electrum/lnchannel.py @@ -422,17 +422,12 @@ class Channel(Logger): if cur_point != derived_point: raise Exception('revoked secret not for current point') - # FIXME not sure this is correct... but it seems to work - # if there are update_add_htlc msgs between commitment_signed and rev_ack, - # this might break - next_ctn = self.config[REMOTE].ctn + 1 - prev_remote_commitment = self.pending_commitment(REMOTE) self.config[REMOTE].revocation_store.add_next_entry(revocation.per_commitment_secret) ##### start applying fee/htlc changes next_point = self.config[REMOTE].next_per_commitment_point self.hm.recv_rev() self.config[REMOTE]=self.config[REMOTE]._replace( - ctn=next_ctn, + ctn=self.config[REMOTE].ctn + 1, current_per_commitment_point=next_point, next_per_commitment_point=revocation.next_per_commitment_point, ) diff --git a/electrum/lnpeer.py b/electrum/lnpeer.py index 5842a9665..73f558d97 100644 --- a/electrum/lnpeer.py +++ b/electrum/lnpeer.py @@ -1157,7 +1157,7 @@ class Peer(Logger): onion_packet=onion_packet, processed_onion=processed_onion)) - @log_exceptions + @log_exceptions async def _maybe_forward_htlc(self, chan: Channel, htlc: UpdateAddHtlc, *, local_ctn: int, remote_ctn: int, onion_packet: OnionPacket, processed_onion: ProcessedOnionPacket): await self.await_local(chan, local_ctn)