1
0

lnchannel: save htlc preimages as soon as possible but horribly hacky

will properly clean this up...
This commit is contained in:
SomberNight
2019-02-26 21:28:11 +01:00
committed by ThomasV
parent 7292da24e6
commit ef7a59b4a9
3 changed files with 17 additions and 12 deletions

View File

@@ -379,6 +379,7 @@ class Peer(PrintError):
payment_completed=self.lnworker.payment_completed)
chan.lnwatcher = self.lnwatcher
chan.get_preimage = self.lnworker.get_preimage # FIXME hack.
chan.save_preimage = self.lnworker.save_preimage # FIXME hack.
sig_64, _ = chan.sign_next_commitment()
self.send_message("funding_created",
temporary_channel_id=temp_channel_id,
@@ -472,6 +473,7 @@ class Peer(PrintError):
payment_completed=self.lnworker.payment_completed)
chan.lnwatcher = self.lnwatcher
chan.get_preimage = self.lnworker.get_preimage # FIXME hack.
chan.save_preimage = self.lnworker.save_preimage # FIXME hack.
remote_sig = funding_created['signature']
chan.receive_new_commitment(remote_sig, [])
sig_64, _ = chan.sign_next_commitment()