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