Просмотр исходного кода

Merge branch 'feature/wallet-db-transactions' into go-ffi

Cesar Rodas 2 месяцев назад
Родитель
Сommit
216827e9a1
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      crates/cdk-sqlite/src/wallet/mod.rs

+ 3 - 1
crates/cdk-sqlite/src/wallet/mod.rs

@@ -237,7 +237,9 @@ mod tests {
         }
 
         // Store all proofs in the database
-        db.update_proofs(proof_infos.clone(), vec![]).await.unwrap();
+        let mut tx = db.begin_db_transaction().await.unwrap();
+        tx.update_proofs(proof_infos.clone(), vec![]).await.unwrap();
+        tx.commit().await.unwrap();
 
         // Test 1: Retrieve all proofs by their Y values
         let retrieved_proofs = db.get_proofs_by_ys(expected_ys.clone()).await.unwrap();