refactor(chain,wallet)!: move rusqlite things into it's own file

Also fix imports and rename `sqlite` module to `rusqlite_impl`.
This commit is contained in:
志宇
2024-07-19 11:20:34 +00:00
parent 93f9b83e27
commit 2cf07d686b
14 changed files with 587 additions and 602 deletions

View File

@@ -169,10 +169,10 @@ fn wallet_is_persisted() -> anyhow::Result<()> {
|path| Ok(bdk_file_store::Store::create_new(DB_MAGIC, path)?),
|path| Ok(bdk_file_store::Store::open(DB_MAGIC, path)?),
)?;
run::<bdk_chain::sqlite::Connection, _, _>(
run::<bdk_chain::rusqlite::Connection, _, _>(
"store.sqlite",
|path| Ok(bdk_chain::sqlite::Connection::open(path)?),
|path| Ok(bdk_chain::sqlite::Connection::open(path)?),
|path| Ok(bdk_chain::rusqlite::Connection::open(path)?),
|path| Ok(bdk_chain::rusqlite::Connection::open(path)?),
)?;
Ok(())
@@ -258,8 +258,8 @@ fn wallet_load_checks() -> anyhow::Result<()> {
)?;
run(
"store.sqlite",
|path| Ok(bdk_chain::sqlite::Connection::open(path)?),
|path| Ok(bdk_chain::sqlite::Connection::open(path)?),
|path| Ok(bdk_chain::rusqlite::Connection::open(path)?),
|path| Ok(bdk_chain::rusqlite::Connection::open(path)?),
)?;
Ok(())