Skip to content

Commit af6fc08

Browse files
committedJun 10, 2024·
rpc_api: Delete database connections.
1 parent 4fcf394 commit af6fc08

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed
 

‎src/client/mod.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
//! Client crate mocks the `Client` struct in `bitcoincore-rpc`.
44
55
use crate::ledger::Ledger;
6-
use bitcoin_simulator::database::Database;
76

87
mod rpc_api;
98

@@ -23,11 +22,8 @@ impl Client {
2322
///
2423
/// # Panics
2524
///
26-
/// This function will panic if connection to the SQLite database cannot be
27-
/// established.
25+
/// This function can panic if `Ledger` can't be created.
2826
pub fn new(_url: &str, _auth: bitcoincore_rpc::Auth) -> bitcoincore_rpc::Result<Self> {
29-
let database = Database::connect_temporary_database().unwrap();
30-
3127
Ok(Self {
3228
ledger: Ledger::new(),
3329
})

‎src/client/rpc_api.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ mod tests {
342342
value: Amount::from_sat(1),
343343
script_pubkey: address.script_pubkey(),
344344
};
345-
let tx = Transaction {
345+
let _tx = Transaction {
346346
version: bitcoin::transaction::Version(2),
347347
lock_time: absolute::LockTime::from_consensus(0),
348348
input: vec![],
@@ -367,7 +367,7 @@ mod tests {
367367
value: Amount::from_sat(1),
368368
script_pubkey: address.script_pubkey(),
369369
};
370-
let tx = Transaction {
370+
let _tx = Transaction {
371371
version: bitcoin::transaction::Version(2),
372372
lock_time: absolute::LockTime::from_consensus(0),
373373
input: vec![],

0 commit comments

Comments
 (0)
Please sign in to comment.