mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-05-06 16:55:08 -04:00
Add database todos
This commit is contained in:
parent
62bc3c0432
commit
3e82211a82
1 changed files with 2 additions and 0 deletions
|
@ -14,6 +14,7 @@ impl<T> Database<T>
|
|||
where
|
||||
T: Serialize + DeserializeOwned,
|
||||
{
|
||||
// TODO: serialize using lazy/one-time initlisation
|
||||
const LAST_STATE_KEY: &'static str = "latest_state";
|
||||
|
||||
pub fn open(path: &Path) -> Result<Self> {
|
||||
|
@ -37,6 +38,7 @@ where
|
|||
.context("Could not write in the DB")?
|
||||
.context("Stored swap somehow changed, aborting saving")?;
|
||||
|
||||
// TODO: see if this can be done through sled config
|
||||
self.db
|
||||
.flush_async()
|
||||
.await
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue