Skip to content

Commit

Permalink
patch manifest path
Browse files Browse the repository at this point in the history
  • Loading branch information
Basil McMarten committed Jan 21, 2025
1 parent b8175f3 commit 6fe1969
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/extract_snapshot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ use crate::{
};

// uses libra-compatibility to parse the v5 manifest files, and decode v5 format bytecode into current version data structures (v6+);
pub async fn extract_v5_snapshot(v5_manifest_path: &Path) -> Result<Vec<WarehouseAccState>> {
pub async fn extract_v5_snapshot(archive_path: &Path) -> Result<Vec<WarehouseAccState>> {
let v5_manifest_path = archive_path.join("state.manifest");
// NOTE: this is duplicated with next step.
let manifest_data = v5_read_from_snapshot_manifest(v5_manifest_path)?;
let account_blobs = v5_accounts_from_manifest_path(v5_manifest_path).await?;
let manifest_data = v5_read_from_snapshot_manifest(&v5_manifest_path)?;
let account_blobs = v5_accounts_from_manifest_path(&v5_manifest_path).await?;

// TODO: see below, massively inefficient
let time = WarehouseTime {
Expand Down
3 changes: 2 additions & 1 deletion src/warehouse_cli.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use anyhow::{bail, Result};
use clap::{Parser, Subcommand};
use log::{error, info, warn};
use log::{debug, error, info, warn};
use neo4rs::Graph;
use serde_json::json;
use std::path::PathBuf;
Expand Down Expand Up @@ -157,6 +157,7 @@ impl WarehouseCli {
batch_size,
} => {
let am = scan_dir_archive(archive_dir, None)?;
debug!("archive map: {:?}", &am);
if am.0.is_empty() {
error!("cannot find .manifest file under {}", archive_dir.display());
}
Expand Down

0 comments on commit 6fe1969

Please sign in to comment.