mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-05-10 06:09:10 -07:00
computer: store part 8
This commit is contained in:
@@ -13,3 +13,4 @@ repository.workspace = true
|
||||
brk_core = { workspace = true }
|
||||
byteview = { workspace = true }
|
||||
fjall = { workspace = true }
|
||||
log = { workspace = true }
|
||||
|
||||
@@ -14,13 +14,13 @@ use std::{
|
||||
use brk_core::{Height, Result, Version};
|
||||
use byteview::ByteView;
|
||||
use fjall::{
|
||||
PartitionCreateOptions, PersistMode, ReadTransaction, TransactionalKeyspace,
|
||||
TransactionalPartitionHandle,
|
||||
PartitionCreateOptions, ReadTransaction, TransactionalKeyspace, TransactionalPartitionHandle,
|
||||
};
|
||||
|
||||
mod meta;
|
||||
mod r#trait;
|
||||
|
||||
use log::info;
|
||||
use meta::*;
|
||||
pub use r#trait::*;
|
||||
|
||||
@@ -241,12 +241,12 @@ where
|
||||
}
|
||||
|
||||
fn reset(&mut self) -> Result<()> {
|
||||
info!("Resetting {}...", self.name);
|
||||
|
||||
let partition: TransactionalPartitionHandle = self.partition.take().unwrap();
|
||||
|
||||
self.keyspace.delete_partition(partition)?;
|
||||
|
||||
self.keyspace.persist(PersistMode::SyncAll)?;
|
||||
|
||||
self.meta.reset();
|
||||
|
||||
let partition =
|
||||
|
||||
Reference in New Issue
Block a user