checkpoint

This commit is contained in:
John Smith
2022-12-28 12:12:04 -05:00
parent 99d840e281
commit de8349004d
10 changed files with 342 additions and 54 deletions

View File

@@ -241,7 +241,7 @@ impl RoutingTable {
let table_store = self.network_manager().table_store();
let tdb = table_store.open("routing_table", 1).await?;
let bucket_count = bucketvec.len();
let mut dbx = tdb.transact();
let dbx = tdb.transact();
if let Err(e) = dbx.store_rkyv(0, b"bucket_count", &bucket_count) {
dbx.rollback();
return Err(e);
@@ -250,7 +250,7 @@ impl RoutingTable {
for (n, b) in bucketvec.iter().enumerate() {
dbx.store(0, format!("bucket_{}", n).as_bytes(), b)
}
dbx.commit()?;
dbx.commit().await?;
Ok(())
}