remove flow db

This commit is contained in:
Peter Zhang 2024-10-30 13:33:16 +08:00
parent e2e2f3d84c
commit 559b7fbfc2
2 changed files with 2 additions and 8 deletions

View File

@ -25,16 +25,14 @@ use tracing::{debug, error, trace};
use zgs_spec::{BYTES_PER_SECTOR, SEALS_PER_LOAD, SECTORS_PER_LOAD, SECTORS_PER_SEAL};
pub struct FlowStore {
flow_db: Arc<FlowDBStore>,
data_db: Arc<FlowDBStore>,
seal_manager: SealTaskManager,
config: FlowConfig,
}
impl FlowStore {
pub fn new(flow_db: Arc<FlowDBStore>, data_db: Arc<FlowDBStore>, config: FlowConfig) -> Self {
pub fn new(data_db: Arc<FlowDBStore>, config: FlowConfig) -> Self {
Self {
flow_db,
data_db,
seal_manager: Default::default(),
config,

View File

@ -638,11 +638,7 @@ impl LogManager {
let tx_store = TransactionStore::new(flow_db_source.clone())?;
let flow_db = Arc::new(FlowDBStore::new(flow_db_source.clone()));
let data_db = Arc::new(FlowDBStore::new(data_db_source.clone()));
let flow_store = Arc::new(FlowStore::new(
flow_db.clone(),
data_db.clone(),
config.flow.clone(),
));
let flow_store = Arc::new(FlowStore::new(data_db.clone(), config.flow.clone()));
// If the last tx `put_tx` does not complete, we will revert it in `pora_chunks_merkle`
// first and call `put_tx` later.
let next_tx_seq = tx_store.next_tx_seq();