Skip to content

Commit a111d25

Browse files
committed
Deprecate Database::flush() function
The Database::flush() function is only needed for the sled database on mobile, instead for mobile use the sqlite database.
1 parent 0621ca8 commit a111d25

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88

99
- Add `sqlite-bundled` feature for deployments that need a bundled version of sqlite, ie. for mobile platforms.
1010
- Added `Wallet::get_signers()`, `Wallet::descriptor_checksum()` and `Wallet::get_address_validators()`, exposed the `AsDerived` trait.
11+
- Deprecate `database::Database::flush()`, the function is only needed for the sled database on mobile, instead for mobile use the sqlite database.
1112

1213
## [v0.17.0] - [v0.16.1]
1314

src/database/any.rs

+1
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ macro_rules! impl_from {
6161

6262
macro_rules! impl_inner_method {
6363
( $enum_name:ident, $self:expr, $name:ident $(, $args:expr)* ) => {
64+
#[allow(deprecated)]
6465
match $self {
6566
$enum_name::Memory(inner) => inner.$name( $($args, )* ),
6667
#[cfg(feature = "key-value-db")]

src/database/mod.rs

+4
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@ pub trait Database: BatchOperations {
159159
/// It should insert and return `0` if not present in the database
160160
fn increment_last_index(&mut self, keychain: KeychainKind) -> Result<u32, Error>;
161161

162+
#[deprecated(
163+
since = "0.18.0",
164+
note = "The flush function is only needed for the sled database on mobile, instead for mobile use the sqlite database."
165+
)]
162166
/// Force changes to be written to disk
163167
fn flush(&mut self) -> Result<(), Error>;
164168
}

0 commit comments

Comments
 (0)