From 4566eadb3ea5bf6996b706e72d16a89c290b20de Mon Sep 17 00:00:00 2001 From: MiniFrenchBread <103425574+MiniFrenchBread@users.noreply.github.com> Date: Fri, 15 Nov 2024 08:26:34 +0800 Subject: [PATCH] chore: expose chunk data (#270) * chore: expose chunk data --- node/storage/src/log_store/load_chunk/chunk_data.rs | 6 ++++++ node/storage/src/log_store/load_chunk/mod.rs | 2 +- node/storage/src/log_store/mod.rs | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/node/storage/src/log_store/load_chunk/chunk_data.rs b/node/storage/src/log_store/load_chunk/chunk_data.rs index e816d4d..86b22eb 100644 --- a/node/storage/src/log_store/load_chunk/chunk_data.rs +++ b/node/storage/src/log_store/load_chunk/chunk_data.rs @@ -128,6 +128,12 @@ impl DataRange for Subtree { } } +impl Default for EntryBatchData { + fn default() -> Self { + Self::new() + } +} + impl EntryBatchData { pub fn new() -> Self { EntryBatchData::Incomplete(IncompleteData { diff --git a/node/storage/src/log_store/load_chunk/mod.rs b/node/storage/src/log_store/load_chunk/mod.rs index 0a68dbc..9d60d25 100644 --- a/node/storage/src/log_store/load_chunk/mod.rs +++ b/node/storage/src/log_store/load_chunk/mod.rs @@ -20,7 +20,7 @@ use zgs_spec::{ }; use super::SealAnswer; -use chunk_data::EntryBatchData; +pub use chunk_data::EntryBatchData; use seal::SealInfo; #[derive(Debug, Encode, Decode, Deserialize, Serialize)] diff --git a/node/storage/src/log_store/mod.rs b/node/storage/src/log_store/mod.rs index c51c2e0..b143a4c 100644 --- a/node/storage/src/log_store/mod.rs +++ b/node/storage/src/log_store/mod.rs @@ -14,7 +14,7 @@ use self::tx_store::{BlockHashAndSubmissionIndex, TxStatus}; pub mod config; mod flow_store; -mod load_chunk; +pub mod load_chunk; pub mod log_manager; mod metrics; mod seal_task_manager;