electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 788d54f9a67d819a69e9e80186a45322b5559b55
parent 8331f0049c69208d87f3fa885bbc4b143970b668
Author: ThomasV <thomasv@electrum.org>
Date:   Wed,  9 Oct 2019 19:54:43 +0200

remove another instance of lnworker accessed in lnchannel

Diffstat:
Melectrum/lnchannel.py | 2--
Melectrum/lnpeer.py | 2++
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/electrum/lnchannel.py b/electrum/lnchannel.py @@ -572,8 +572,6 @@ class Channel(Logger): assert htlc.payment_hash == sha256(preimage) assert htlc_id not in log['settles'] self.hm.send_settle(htlc_id) - if self.lnworker: - self.lnworker.set_invoice_status(htlc.payment_hash, PR_PAID) def receive_htlc_settle(self, preimage, htlc_id): self.logger.info("receive_htlc_settle") diff --git a/electrum/lnpeer.py b/electrum/lnpeer.py @@ -1442,6 +1442,8 @@ class Peer(Logger): async def _fulfill_htlc(self, chan: Channel, htlc_id: int, preimage: bytes): self.logger.info(f"_fulfill_htlc. chan {chan.short_channel_id}. htlc_id {htlc_id}") chan.settle_htlc(preimage, htlc_id) + payment_hash = sha256(preimage) + self.lnworker.set_invoice_status(payment_hash, PR_PAID) remote_ctn = chan.get_latest_ctn(REMOTE) self.send_message("update_fulfill_htlc", channel_id=chan.channel_id,