Skip to content

Commit

Permalink
Fix regtest tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ok300 committed Feb 3, 2025
1 parent ebc275c commit 18a3705
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions crates/cdk-integration-tests/src/bin/regtest_mint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ async fn main() -> Result<()> {
let mint_db_kind = env::var("MINT_DATABASE")?;

let lnd_mint_db_path = get_temp_dir().join("lnd_mint");
std::fs::create_dir_all(&lnd_mint_db_path)?;
let cln_mint_db_path = get_temp_dir().join("cln_mint");
std::fs::create_dir_all(&cln_mint_db_path)?;

let cln_backend = create_cln_backend(&cln_client).await?;
let lnd_mint_port = 8087;
Expand Down
8 changes: 5 additions & 3 deletions crates/cdk-redb/src/wallet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,11 @@ pub struct WalletRedbDatabase {

impl WalletRedbDatabase {
/// Create new [`WalletRedbDatabase`]
pub fn new(path: &Path) -> Result<Self, Error> {
pub fn new(work_dir: &Path) -> Result<Self, Error> {
let db_file_path = work_dir.join("cdk-mintd.redb");

{
let db = Arc::new(Database::create(path)?);
let db = Arc::new(Database::create(&db_file_path)?);

let db_version: Option<String>;
{
Expand Down Expand Up @@ -143,7 +145,7 @@ impl WalletRedbDatabase {
drop(db);
}

let db = Database::create(path)?;
let db = Database::create(db_file_path)?;

Ok(Self { db: Arc::new(db) })
}
Expand Down

0 comments on commit 18a3705

Please sign in to comment.