feat: Refactor node initialization and info retrieval, enhance store actor lifecycle, and refine store replay logic.

This commit is contained in:
2025-12-22 02:59:55 +01:00
parent a1f134eb02
commit c2d4219320
5 changed files with 118 additions and 55 deletions
+4 -8
View File
@@ -13,25 +13,21 @@ fn main() {
println!("Lattice CLI v{}", env!("CARGO_PKG_VERSION"));
println!("Type 'help' for commands, 'quit' to exit.\n");
let (node, info) = match LatticeNodeBuilder::new().build() {
Ok(result) => result,
let node = match LatticeNodeBuilder::new().build() {
Ok(n) => n,
Err(e) => {
eprintln!("Failed to initialize: {}", e);
return;
}
};
let info = node.info();
println!("Node ID: {}", info.node_id);
println!("Data: {}", info.data_path);
if info.is_new {
println!("Status: New identity created");
} else if !info.stores.is_empty() {
if !info.stores.is_empty() {
println!("Stores: {}", info.stores.len());
}
if let Some(root) = info.root_store {
println!("Root: {}", root);
}
let mut current_store: Option<StoreHandle> = match node.open_root_store() {
Ok(Some((h, open_info))) => {