From 632ea24fbb28ea5149ef530e5001f80840a1856c Mon Sep 17 00:00:00 2001 From: Janus Date: Fri, 15 Jun 2018 18:51:49 +0200 Subject: [PATCH] ln: lnpay: revoke until we get a commitment tx without htlcs --- lib/lnbase.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/lnbase.py b/lib/lnbase.py index 66f2935ce..9168d3544 100644 --- a/lib/lnbase.py +++ b/lib/lnbase.py @@ -1025,10 +1025,8 @@ class Peer(PrintError): update_fulfill_htlc_msg = await self.update_fulfill_htlc[chan.channel_id].get() m.receive_htlc_settle(update_fulfill_htlc_msg["payment_preimage"], int.from_bytes(update_fulfill_htlc_msg["id"], "big")) - self.revoke(m) - - while (await self.commitment_signed[chan.channel_id].get())["htlc_signature"] == b"": - pass + while (await self.commitment_signed[chan.channel_id].get())["htlc_signature"] != b"": + self.revoke(m) # TODO process above commitment transactions bare_ctx = make_commitment_using_open_channel(m.state, m.state.remote_state.ctn + 1, False, m.state.remote_state.next_per_commitment_point,