|
@ -862,8 +862,9 @@ class Peer(PrintError): |
|
|
if failure_coro.done(): |
|
|
if failure_coro.done(): |
|
|
sig_64, htlc_sigs = chan.sign_next_commitment() |
|
|
sig_64, htlc_sigs = chan.sign_next_commitment() |
|
|
self.send_message(gen_msg("commitment_signed", channel_id=chan.channel_id, signature=sig_64, num_htlcs=1, htlc_signature=htlc_sigs[0])) |
|
|
self.send_message(gen_msg("commitment_signed", channel_id=chan.channel_id, signature=sig_64, num_htlcs=1, htlc_signature=htlc_sigs[0])) |
|
|
|
|
|
self.revoke(chan) |
|
|
while (await self.commitment_signed[chan.channel_id].get())["htlc_signature"] != b"": |
|
|
while (await self.commitment_signed[chan.channel_id].get())["htlc_signature"] != b"": |
|
|
self.revoke(chan) |
|
|
pass |
|
|
# TODO process above commitment transactions |
|
|
# TODO process above commitment transactions |
|
|
await self.receive_revoke(chan) |
|
|
await self.receive_revoke(chan) |
|
|
chan.fail_htlc(htlc) |
|
|
chan.fail_htlc(htlc) |
|
@ -880,12 +881,12 @@ class Peer(PrintError): |
|
|
preimage = update_fulfill_htlc_msg["payment_preimage"] |
|
|
preimage = update_fulfill_htlc_msg["payment_preimage"] |
|
|
chan.receive_htlc_settle(preimage, int.from_bytes(update_fulfill_htlc_msg["id"], "big")) |
|
|
chan.receive_htlc_settle(preimage, int.from_bytes(update_fulfill_htlc_msg["id"], "big")) |
|
|
|
|
|
|
|
|
|
|
|
self.revoke(chan) |
|
|
|
|
|
|
|
|
while (await self.commitment_signed[chan.channel_id].get())["htlc_signature"] != b"": |
|
|
while (await self.commitment_signed[chan.channel_id].get())["htlc_signature"] != b"": |
|
|
self.revoke(chan) |
|
|
pass |
|
|
# TODO process above commitment transactions |
|
|
# TODO process above commitment transactions |
|
|
|
|
|
|
|
|
self.revoke(chan) |
|
|
|
|
|
|
|
|
|
|
|
bare_ctx = chan.make_commitment(chan.remote_state.ctn + 1, False, chan.remote_state.next_per_commitment_point, |
|
|
bare_ctx = chan.make_commitment(chan.remote_state.ctn + 1, False, chan.remote_state.next_per_commitment_point, |
|
|
msat_remote, msat_local) |
|
|
msat_remote, msat_local) |
|
|
|
|
|
|
|
|