From c60b9d3ece858fbc8ed4a2600cbed12136044cc9 Mon Sep 17 00:00:00 2001 From: Kris Nuttycombe Date: Thu, 10 Sep 2020 16:38:53 -0600 Subject: [PATCH] Remove database initialization calls from common API. --- zcash_client_backend/src/data_api/mod.rs | 16 ---------------- zcash_client_sqlite/src/lib.rs | 22 ---------------------- 2 files changed, 38 deletions(-) diff --git a/zcash_client_backend/src/data_api/mod.rs b/zcash_client_backend/src/data_api/mod.rs index 3d43a8df2..6bc2cda7b 100644 --- a/zcash_client_backend/src/data_api/mod.rs +++ b/zcash_client_backend/src/data_api/mod.rs @@ -29,22 +29,6 @@ pub trait DBOps { type TxRef: Copy; type UpdateOps: DBUpdate; - fn init_db(&self) -> Result<(), Self::Error>; - - fn init_account_storage( - &self, - params: &P, - extfvks: &[ExtendedFullViewingKey], - ) -> Result<(), Self::Error>; - - fn init_block_storage( - &self, - height: BlockHeight, - hash: BlockHash, - time: u32, //TODO: Newtype! - sapling_tree: &[u8], //TODO: Newtype! - ) -> Result<(), Self::Error>; - fn block_height_extrema(&self) -> Result, Self::Error>; fn get_target_and_anchor_heights( diff --git a/zcash_client_sqlite/src/lib.rs b/zcash_client_sqlite/src/lib.rs index e57a8da0b..29f386685 100644 --- a/zcash_client_sqlite/src/lib.rs +++ b/zcash_client_sqlite/src/lib.rs @@ -80,28 +80,6 @@ impl<'a> DBOps for &'a DataConnection { type TxRef = i64; type UpdateOps = DataConnStmtCache<'a>; - fn init_db(&self) -> Result<(), Self::Error> { - wallet::init::init_data_database(self).map_err(SqliteClientError::from) - } - - fn init_account_storage( - &self, - params: &P, - extfvks: &[ExtendedFullViewingKey], - ) -> Result<(), Self::Error> { - wallet::init::init_accounts_table(self, params, extfvks) - } - - fn init_block_storage( - &self, - height: BlockHeight, - hash: BlockHash, - time: u32, - sapling_tree: &[u8], - ) -> Result<(), Self::Error> { - wallet::init::init_blocks_table(self, height, hash, time, sapling_tree) - } - fn block_height_extrema(&self) -> Result, Self::Error> { wallet::block_height_extrema(self).map_err(SqliteClientError::from) }