1
0

tests: lnpeer.htlc_switch: don't fulfill htlc until add is irrevocable

This adds a failing test, where the HTLC switch fulfills an HTLC too soon,
before the corresponding 'update_add_htlc' is irrevocably committed.
This commit is contained in:
SomberNight
2021-01-28 20:00:48 +01:00
parent 521376f87f
commit e8a2fa5596
5 changed files with 110 additions and 0 deletions

View File

@@ -997,6 +997,7 @@ class Channel(AbstractChannel):
self.hm.recv_rev()
self.config[REMOTE].current_per_commitment_point=self.config[REMOTE].next_per_commitment_point
self.config[REMOTE].next_per_commitment_point=revocation.next_per_commitment_point
assert new_ctn == self.get_oldest_unrevoked_ctn(REMOTE)
# lnworker callbacks
if self.lnworker:
sent = self.hm.sent_in_ctn(new_ctn)