Skip to content

Commit

Permalink
refactor: clean
Browse files Browse the repository at this point in the history
  • Loading branch information
MatejVukosav committed Nov 8, 2024
1 parent 3649e50 commit 45bec96
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions crates/node/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use core::pin::Pin;
use core::str;
use std::time::Duration;

use borsh::{from_slice, to_vec, BorshDeserialize};
use borsh::{from_slice, to_vec};
use calimero_blobstore::config::BlobStoreConfig;
use calimero_blobstore::{BlobManager, FileSystem};
use calimero_context::config::ContextConfig;
Expand All @@ -31,13 +31,10 @@ use calimero_runtime::Constraint;
use calimero_server::config::ServerConfig;
use calimero_store::config::StoreConfig;
use calimero_store::db::RocksDB;
use calimero_store::entry::{Borsh, Codec};
use calimero_store::key::ContextMeta as ContextMetaKey;
use calimero_store::Store;
use camino::Utf8PathBuf;
use eyre::{bail, eyre, Result as EyreResult};
use futures_util::sink::Buffer;
use futures_util::SinkExt;
use libp2p::gossipsub::{IdentTopic, Message, TopicHash};
use libp2p::identity::Keypair;
use rand::{thread_rng, Rng};
Expand Down Expand Up @@ -443,11 +440,10 @@ impl Node {
};

for (proposal_id, actions) in &outcome.proposals {
let actions: Vec<ProposalAction> = BorshDeserialize::deserialize(&mut &actions[..])
.map_err(|e| {
error!(%e, "Failed to deserialize proposal actions.");
CallError::InternalError
})?;
let actions: Vec<ProposalAction> = from_slice(&mut &actions[..]).map_err(|e| {
error!(%e, "Failed to deserialize proposal actions.");
CallError::InternalError
})?;
drop(
self.ctx_manager
.propose(
Expand Down

0 comments on commit 45bec96

Please sign in to comment.