diff --git a/electrum/wallet.py b/electrum/wallet.py index 79fed1b0f..5a7d1dd07 100644 --- a/electrum/wallet.py +++ b/electrum/wallet.py @@ -867,7 +867,7 @@ class Abstract_Wallet(AddressSynchronizer, ABC): for txo in invoice.outputs: # type: PartialTxOutput invoice_amounts[txo.scriptpubkey] += 1 if parse_max_spend(txo.value) else txo.value relevant_txs = [] - with self.transaction_lock: + with self.lock, self.transaction_lock: for invoice_scriptpubkey, invoice_amt in invoice_amounts.items(): scripthash = bitcoin.script_to_scripthash(invoice_scriptpubkey.hex()) prevouts_and_values = self.db.get_prevouts_by_scripthash(scripthash)