electrum

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

commit 31919d0425b1f5828d202f1bfb095eb8c5dfcff2
parent 529e96aaf9a90be5c7d48db704c43eaeb751263b
Author: ThomasV <thomasv@electrum.org>
Date:   Sat,  6 Mar 2021 00:29:37 +0100

lnworker: add assert amount_inflight <= amount_to_pay

Diffstat:
Melectrum/lnworker.py | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/electrum/lnworker.py b/electrum/lnworker.py @@ -1084,6 +1084,7 @@ class LNWallet(LNWorker): min_cltv_expiry=cltv_delta, trampoline_onion=trampoline_onion) amount_inflight += amount_msat + assert amount_inflight <= amount_to_pay, f"amount_inflight {amount_inflight} > amount_to_pay {amount_to_pay}" util.trigger_callback('invoice_status', self.wallet, payment_hash.hex()) # 3. await a queue htlc_log = await self.sent_htlcs[payment_hash].get()