remove Database::flush
This commit is contained in:
parent
17d0ae0f71
commit
e68d3b9e63
@ -52,6 +52,7 @@ To decouple the `Wallet` from the `Blockchain` we've made major changes:
|
|||||||
- Stop making a request for the block height when calling `Wallet:new`.
|
- Stop making a request for the block height when calling `Wallet:new`.
|
||||||
- Added `SyncOptions` to capture extra (future) arguments to `Wallet::sync`.
|
- Added `SyncOptions` to capture extra (future) arguments to `Wallet::sync`.
|
||||||
- Removed `max_addresses` sync parameter which determined how many addresses to cache before syncing since this can just be done with `ensure_addresses_cached`.
|
- Removed `max_addresses` sync parameter which determined how many addresses to cache before syncing since this can just be done with `ensure_addresses_cached`.
|
||||||
|
- remove `flush` method from the `Database` trait.
|
||||||
|
|
||||||
## [v0.16.1] - [v0.16.0]
|
## [v0.16.1] - [v0.16.0]
|
||||||
|
|
||||||
|
@ -255,10 +255,6 @@ impl Database for AnyDatabase {
|
|||||||
fn increment_last_index(&mut self, keychain: KeychainKind) -> Result<u32, Error> {
|
fn increment_last_index(&mut self, keychain: KeychainKind) -> Result<u32, Error> {
|
||||||
impl_inner_method!(AnyDatabase, self, increment_last_index, keychain)
|
impl_inner_method!(AnyDatabase, self, increment_last_index, keychain)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn flush(&mut self) -> Result<(), Error> {
|
|
||||||
impl_inner_method!(AnyDatabase, self, flush)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl BatchOperations for AnyBatch {
|
impl BatchOperations for AnyBatch {
|
||||||
|
@ -402,10 +402,6 @@ impl Database for Tree {
|
|||||||
Ok(val)
|
Ok(val)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fn flush(&mut self) -> Result<(), Error> {
|
|
||||||
Ok(Tree::flush(self).map(|_| ())?)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl BatchDatabase for Tree {
|
impl BatchDatabase for Tree {
|
||||||
|
@ -449,10 +449,6 @@ impl Database for MemoryDatabase {
|
|||||||
|
|
||||||
Ok(*value)
|
Ok(*value)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn flush(&mut self) -> Result<(), Error> {
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl BatchDatabase for MemoryDatabase {
|
impl BatchDatabase for MemoryDatabase {
|
||||||
|
@ -158,13 +158,6 @@ pub trait Database: BatchOperations {
|
|||||||
///
|
///
|
||||||
/// It should insert and return `0` if not present in the database
|
/// It should insert and return `0` if not present in the database
|
||||||
fn increment_last_index(&mut self, keychain: KeychainKind) -> Result<u32, Error>;
|
fn increment_last_index(&mut self, keychain: KeychainKind) -> Result<u32, Error>;
|
||||||
|
|
||||||
#[deprecated(
|
|
||||||
since = "0.18.0",
|
|
||||||
note = "The flush function is only needed for the sled database on mobile, instead for mobile use the sqlite database."
|
|
||||||
)]
|
|
||||||
/// Force changes to be written to disk
|
|
||||||
fn flush(&mut self) -> Result<(), Error>;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Trait for a database that supports batch operations
|
/// Trait for a database that supports batch operations
|
||||||
|
@ -891,10 +891,6 @@ impl Database for SqliteDatabase {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn flush(&mut self) -> Result<(), Error> {
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl BatchDatabase for SqliteDatabase {
|
impl BatchDatabase for SqliteDatabase {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user