From 559b7fbfc29d469bef8f2fc02b5b172b92d42973 Mon Sep 17 00:00:00 2001 From: Peter Zhang Date: Wed, 30 Oct 2024 13:33:16 +0800 Subject: [PATCH] remove flow db --- node/storage/src/log_store/flow_store.rs | 4 +--- node/storage/src/log_store/log_manager.rs | 6 +----- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/node/storage/src/log_store/flow_store.rs b/node/storage/src/log_store/flow_store.rs index 815646d..ed41963 100644 --- a/node/storage/src/log_store/flow_store.rs +++ b/node/storage/src/log_store/flow_store.rs @@ -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, data_db: Arc, seal_manager: SealTaskManager, config: FlowConfig, } impl FlowStore { - pub fn new(flow_db: Arc, data_db: Arc, config: FlowConfig) -> Self { + pub fn new(data_db: Arc, config: FlowConfig) -> Self { Self { - flow_db, data_db, seal_manager: Default::default(), config, diff --git a/node/storage/src/log_store/log_manager.rs b/node/storage/src/log_store/log_manager.rs index cf5bca8..5ef2fa9 100644 --- a/node/storage/src/log_store/log_manager.rs +++ b/node/storage/src/log_store/log_manager.rs @@ -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();