Pārlūkot izejas kodu

Fixed race conditions with melt()

Cesar Rodas 4 nedēļas atpakaļ
vecāks
revīzija
e68f706d11
1 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  1. 3 1
      crates/cdk/src/wallet/melt/melt_bolt11.rs

+ 3 - 1
crates/cdk/src/wallet/melt/melt_bolt11.rs

@@ -378,7 +378,9 @@ impl Wallet {
 
         let inputs_needed_amount = quote_info.amount + quote_info.fee_reserve;
 
-        let available_proofs = self.get_unspent_proofs().await?;
+        let available_proofs = self
+            .get_proofs_with(Some(vec![State::Unspent]), None, Some(&mut tx))
+            .await?;
 
         let active_keyset_ids = self
             .refresh_keysets(Some(&mut tx))