소스 검색

Fixed race conditions with melt()

Cesar Rodas 4 주 전
부모
커밋
e68f706d11
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  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))