From 3bb5ebf137674c0a06d76d5be9f105c3e9525d22 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Mon, 24 Jul 2023 16:39:28 +0200 Subject: [PATCH] simplify check_mpp_status (the distinction that was between is_accepted and is_expired does not seem to be useful) --- electrum/lnworker.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/electrum/lnworker.py b/electrum/lnworker.py index caa4bf852..aa1c44f22 100644 --- a/electrum/lnworker.py +++ b/electrum/lnworker.py @@ -1922,7 +1922,6 @@ class LNWallet(LNWorker): if write_to_disk: self.wallet.save_db() - def check_mpp_status( self, payment_secret: bytes, short_channel_id: ShortChannelID, @@ -1948,11 +1947,7 @@ class LNWallet(LNWorker): elif time.time() - first_timestamp > self.MPP_EXPIRY: is_expired = True - if is_accepted: - # accept only the current part of a bundle - self.set_mpp_status(payment_secret, is_expired, is_accepted) - elif is_expired: - # .. but expire all parts + if is_accepted or is_expired: for x in payment_secrets: if x in self.received_mpp_htlcs: self.set_mpp_status(x, is_expired, is_accepted)