Skip to content

Commit

Permalink
fix sql init module review notes
Browse files Browse the repository at this point in the history
  • Loading branch information
borngraced committed Nov 2, 2023
1 parent 97a64ea commit cfbe0a0
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions zcash_client_sqlite/src/for_async/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub async fn init_wallet_db<P: consensus::Parameters + 'static>(
where
P: Clone + Send + Sync,
{
let wdb = wdb.inner.clone();
let wdb = wdb.inner();
async_blocking(move || {
let wdb = wdb.lock().unwrap();
wallet::init::init_wallet_db(&wdb)
Expand All @@ -27,9 +27,8 @@ pub async fn init_accounts_table<P: consensus::Parameters + 'static>(
where
P: Clone + Send + Sync,
{
let wdb = wdb.inner.clone();
let wdb = wdb.inner();
let extfvks = extfvks.to_vec();

async_blocking(move || {
let wdb = wdb.lock().unwrap();
wallet::init::init_accounts_table(&wdb, &extfvks)
Expand All @@ -47,9 +46,8 @@ pub async fn init_blocks_table<P: consensus::Parameters + 'static>(
where
P: Clone + Send + Sync,
{
let wdb = wdb.inner.clone();
let sapling_tree = sapling_tree.to_vec().clone();

let wdb = wdb.inner();
let sapling_tree = sapling_tree.to_vec();
async_blocking(move || {
let wdb = wdb.lock().unwrap();
wallet::init::init_blocks_table(&wdb, height, hash, time, &sapling_tree)
Expand Down

0 comments on commit cfbe0a0

Please sign in to comment.