Skip to content

Commit

Permalink
fix: merge.
Browse files Browse the repository at this point in the history
  • Loading branch information
l-monninger committed Apr 19, 2024
2 parents 8f40ae4 + dfe3407 commit bada906
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
4 changes: 2 additions & 2 deletions aptos-node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

mod indexer;
mod logger;
mod network;
pub mod network;
mod services;
mod state_sync;
mod storage;
pub mod storage;
pub mod utils;

#[cfg(test)]
Expand Down
10 changes: 9 additions & 1 deletion config/src/config/identity_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,15 @@ pub struct IdentityBlob {

impl IdentityBlob {
pub fn from_file(path: &Path) -> anyhow::Result<IdentityBlob> {
Ok(serde_yaml::from_str(&fs::read_to_string(path)?)?)
let content = fs::read_to_string(path)?;
match serde_yaml::from_str(&content) {
Ok(identity_blob) => Ok(identity_blob),
Err(e) => {
eprintln!("Deserialization error: {:?}", e);
eprintln!("YAML content:\n{}", content);
Err(e.into())
},
}
}

pub fn to_file(&self, path: &Path) -> anyhow::Result<()> {
Expand Down
2 changes: 1 addition & 1 deletion mempool/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ pub use shared_mempool::{
#[cfg(any(test, feature = "fuzzing"))]
pub use tests::{fuzzing, mocks};

mod core_mempool;
pub mod core_mempool;
pub mod counters;
mod logging;
mod shared_mempool;
Expand Down

0 comments on commit bada906

Please sign in to comment.