You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove Database::flush() function added in #409and call it internally in the keyvalue::Database impl in functions that create or update Tree data.
Currently only the keyvalue::Database impl does anything in the Database::flush function and @thunderbiscuit and I confirmed it needs to be called to fix bitcoindevkit/bdk-ffi#114 on Android. But the Database::flush is not used or needed for the Memory or Sqlite databases, see also bitcoindevkit/bdk-ffi#116 (comment).
EDIT: as discussed in #575 for now it's enough to only remove the Database::flush() function. The auto-flushing is probably not the right approach at this time.
The text was updated successfully, but these errors were encountered:
5ff8320 add private function ivcec_to_u32 in keyvalue (KaFai Choi)
e68d3b9 remove Database::flush (KaFai Choi)
Pull request description:
<!-- You can erase any parts of this template not applicable to your Pull Request. -->
### Description
This PR is to remove Database::flush. See this issue for detail #567
### Notes to the reviewers
The 2nd commit is a small refactoring of adding a new private ivec_to_u32 to avoid too much code duplication. Please let me know if it's ok to include this in this PR or I should make it into a separate PR
Currently existing test cases are shared across for all Databaes implementation so I am not sure if we should add specific test cases for keyvalue(Tree) for this auto-flush behaviour?(and I feel like it's more a implementation detail). Please let me know how should I proceed for test case in this PR
### 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`
#### Bugfixes:
* [ ] This pull request breaks the existing API
* [ ] I've added tests to reproduce the issue which are now passing
* [ ] I'm linking the issue being fixed by this PR
ACKs for top commit:
danielabrozzoni:
re-ACK 5ff8320
Tree-SHA512: eb37de8217efeb89d3ae346da36d0fb55aa67554d591b4759500f793bcf6aa7601c3d717fd473136c88e76aa72dbb6008ecf62b1d4ccf5ba3cbd1598f758522a
Remove
Database::flush()
function added in #409and call it internally in the.keyvalue::Database
impl in functions that create or update Tree dataCurrently only the
keyvalue::Database
impl does anything in theDatabase::flush
function and @thunderbiscuit and I confirmed it needs to be called to fix bitcoindevkit/bdk-ffi#114 on Android. But theDatabase::flush
is not used or needed for theMemory
orSqlite
databases, see also bitcoindevkit/bdk-ffi#116 (comment).EDIT: as discussed in #575 for now it's enough to only remove the
Database::flush()
function. The auto-flushing is probably not the right approach at this time.The text was updated successfully, but these errors were encountered: