Remove Database::flush() function added in #409 and 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.
Remove
Database::flush()function added in #409and call it internally in the.keyvalue::Databaseimpl in functions that create or update Tree dataCurrently only the
keyvalue::Databaseimpl does anything in theDatabase::flushfunction and @thunderbiscuit and I confirmed it needs to be called to fix bitcoindevkit/bdk-ffi#114 on Android. But theDatabase::flushis not used or needed for theMemoryorSqlitedatabases, 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.