1
0

fix deadlock: self.lock should be taken before self.transaction_lock

(self.lock is taken in self.get_tx.height)
This commit is contained in:
ThomasV
2022-03-23 19:23:32 +01:00
parent 05649861c8
commit d3476b6ba0

View File

@@ -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)