From af6fc08cc7be1aedc8ae2a8b7e778295cba24e85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ceyhun=20=C5=9Een?= Date: Mon, 10 Jun 2024 15:47:25 +0300 Subject: [PATCH] rpc_api: Delete database connections. --- src/client/mod.rs | 6 +----- src/client/rpc_api.rs | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/client/mod.rs b/src/client/mod.rs index b8b16a5..b21f991 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -3,7 +3,6 @@ //! Client crate mocks the `Client` struct in `bitcoincore-rpc`. use crate::ledger::Ledger; -use bitcoin_simulator::database::Database; mod rpc_api; @@ -23,11 +22,8 @@ impl Client { /// /// # Panics /// - /// This function will panic if connection to the SQLite database cannot be - /// established. + /// This function can panic if `Ledger` can't be created. pub fn new(_url: &str, _auth: bitcoincore_rpc::Auth) -> bitcoincore_rpc::Result { - let database = Database::connect_temporary_database().unwrap(); - Ok(Self { ledger: Ledger::new(), }) diff --git a/src/client/rpc_api.rs b/src/client/rpc_api.rs index efa1894..dc1b0c2 100644 --- a/src/client/rpc_api.rs +++ b/src/client/rpc_api.rs @@ -342,7 +342,7 @@ mod tests { value: Amount::from_sat(1), script_pubkey: address.script_pubkey(), }; - let tx = Transaction { + let _tx = Transaction { version: bitcoin::transaction::Version(2), lock_time: absolute::LockTime::from_consensus(0), input: vec![], @@ -367,7 +367,7 @@ mod tests { value: Amount::from_sat(1), script_pubkey: address.script_pubkey(), }; - let tx = Transaction { + let _tx = Transaction { version: bitcoin::transaction::Version(2), lock_time: absolute::LockTime::from_consensus(0), input: vec![],