Browse Source

lnchannel: trivial clean-up

dependabot/pip/contrib/deterministic-build/ecdsa-0.13.3
SomberNight 5 years ago
committed by ThomasV
parent
commit
0d84873a75
  1. 7
      electrum/lnchannel.py

7
electrum/lnchannel.py

@ -422,17 +422,12 @@ class Channel(Logger):
if cur_point != derived_point: if cur_point != derived_point:
raise Exception('revoked secret not for current 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) self.config[REMOTE].revocation_store.add_next_entry(revocation.per_commitment_secret)
##### start applying fee/htlc changes ##### start applying fee/htlc changes
next_point = self.config[REMOTE].next_per_commitment_point next_point = self.config[REMOTE].next_per_commitment_point
self.hm.recv_rev() self.hm.recv_rev()
self.config[REMOTE]=self.config[REMOTE]._replace( self.config[REMOTE]=self.config[REMOTE]._replace(
ctn=next_ctn, ctn=self.config[REMOTE].ctn + 1,
current_per_commitment_point=next_point, current_per_commitment_point=next_point,
next_per_commitment_point=revocation.next_per_commitment_point, next_per_commitment_point=revocation.next_per_commitment_point,
) )

Loading…
Cancel
Save