Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions fendermint/vm/interpreter/src/fvm/state/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,8 @@ where
if msg.sequence.is_zero() {
let state_tree = s.state_tree_mut();
if let Some(id) = state_tree.lookup_id(&msg.from)? {
state_tree.get_actor(id)?.map(|st| {
state_tree.get_actor(id)?.inspect(|st| {
msg.sequence = st.sequence;
st
});
}
}
Expand Down
10 changes: 4 additions & 6 deletions ipc/cli/src/commands/config/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,12 @@ impl CommandLineHandler for InitConfig {
if let Some(parent) = file_path.parent() {
std::fs::create_dir_all(parent)?;
}
let mut file = std::fs::File::create(&path).map_err(|e| {
log::error!("couldn't create config file");
e
let mut file = std::fs::File::create(&path).inspect_err(|e| {
log::error!("couldn't create config file: {e}");
})?;
file.write_all(DEFAULT_CONFIG_TEMPLATE.as_bytes())
.map_err(|e| {
log::error!("error populating empty config template");
e
.inspect_err(|e| {
log::error!("error populating empty config template: {e}");
})?;

log::info!("Empty config populated successful in {}", &path);
Expand Down
8 changes: 3 additions & 5 deletions ipc/wallet/src/fvm/keystore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,11 @@ impl KeyStore {
// Existing cleartext JSON keystore
let persisted_key_info: HashMap<String, PersistentKeyInfo> =
serde_json::from_reader(reader)
.map_err(|e| {
.inspect_err(|_e| {
error!(
"failed to deserialize keyfile, initializing new keystore at: {:?}",
file_path
);
e
})
.unwrap_or_default();

Expand Down Expand Up @@ -292,9 +291,8 @@ impl KeyStore {
.map_err(|error| Error::Other(error.to_string()))?;

let key_info = serde_ipld_dagcbor::from_slice(&decrypted_data)
.map_err(|e| {
error!("Failed to deserialize keyfile, initializing new");
e
.inspect_err(|_e| {
error!("failed to deserialize keyfile, initializing new");
})
.unwrap_or_default();

Expand Down