Merge bitcoindevkit/bdk#577: Deprecate Database::flush() function
a111d254769bfa698043cb9172a3e1cc84329ee4 Deprecate Database::flush() function (Steve Myers) Pull request description: ### Description The Database::flush() function is only needed for the sled database on mobile, instead for mobile use the sqlite database. ### Notes to the reviewers This PR is in preparation for removing the Database::flush() function. See https://github.com/bitcoindevkit/bdk/pull/575#issuecomment-1082916667. After the `release/0.18.0` feature freeze branch is created then #575 should be merged. ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) * [x] I ran `cargo fmt` and `cargo clippy` before committing #### New Features: * [ ] I've added tests for the new feature * [ ] I've added docs for the new feature * [x] I've updated `CHANGELOG.md` ACKs for top commit: afilini: ACK a111d254769bfa698043cb9172a3e1cc84329ee4 Tree-SHA512: 18434dc95dbef47118a0d4fface908bdf920a7ffcef927b36bb740c15f8efcf11dea9198b364648f16f74aaec4aa18e92a3c5e925299b2f3b9d69e566f89e790
This commit is contained in:
commit
c307bacb9c
@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
- Add `sqlite-bundled` feature for deployments that need a bundled version of sqlite, ie. for mobile platforms.
|
||||
- Added `Wallet::get_signers()`, `Wallet::descriptor_checksum()` and `Wallet::get_address_validators()`, exposed the `AsDerived` trait.
|
||||
- Deprecate `database::Database::flush()`, the function is only needed for the sled database on mobile, instead for mobile use the sqlite database.
|
||||
|
||||
## [v0.17.0] - [v0.16.1]
|
||||
|
||||
|
@ -61,6 +61,7 @@ macro_rules! impl_from {
|
||||
|
||||
macro_rules! impl_inner_method {
|
||||
( $enum_name:ident, $self:expr, $name:ident $(, $args:expr)* ) => {
|
||||
#[allow(deprecated)]
|
||||
match $self {
|
||||
$enum_name::Memory(inner) => inner.$name( $($args, )* ),
|
||||
#[cfg(feature = "key-value-db")]
|
||||
|
@ -159,6 +159,10 @@ pub trait Database: BatchOperations {
|
||||
/// It should insert and return `0` if not present in the database
|
||||
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>;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user