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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user