Remove database initialization calls from common API.

This commit is contained in:
Kris Nuttycombe 2020-09-10 16:38:53 -06:00
parent 903ef58ec6
commit c60b9d3ece
2 changed files with 0 additions and 38 deletions

View File

@ -29,22 +29,6 @@ pub trait DBOps {
type TxRef: Copy;
type UpdateOps: DBUpdate<Error = Self::Error, NoteRef = Self::NoteRef, TxRef = Self::TxRef>;
fn init_db(&self) -> Result<(), Self::Error>;
fn init_account_storage<P: consensus::Parameters>(
&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<Option<(BlockHeight, BlockHeight)>, Self::Error>;
fn get_target_and_anchor_heights(

View File

@ -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<P: consensus::Parameters>(
&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<Option<(BlockHeight, BlockHeight)>, Self::Error> {
wallet::block_height_extrema(self).map_err(SqliteClientError::from)
}