Skip to content

Commit

Permalink
Add sql_conn getter to WalletDb.
Browse files Browse the repository at this point in the history
  • Loading branch information
Artem Vitae committed May 9, 2022
1 parent d02549e commit 95fa511
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions zcash_client_sqlite/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,10 @@ pub struct WalletDb<P> {
}

impl<P: consensus::Parameters> WalletDb<P> {
pub fn sql_conn(&self) -> &Connection {
&self.conn
}

/// Construct a connection to the wallet database stored at the specified path.
pub fn for_path<F: AsRef<Path>>(path: F, params: P) -> Result<Self, rusqlite::Error> {
Connection::open(path).map(move |conn| WalletDb { conn, params })
Expand Down

0 comments on commit 95fa511

Please sign in to comment.