Skip to content

Commit

Permalink
cleanly regroup imports
Browse files Browse the repository at this point in the history
  • Loading branch information
dknopik committed Feb 14, 2025
1 parent 9932824 commit e9df5ea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
5 changes: 2 additions & 3 deletions anchor/network/src/handshake/node_info.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
use crate::handshake::envelope::{make_unsigned, Envelope};
use crate::handshake::node_info::Error::Validation;
use discv5::libp2p_identity::{Keypair, SigningError};
use serde::{Deserialize, Serialize};
use serde_json;

use crate::handshake::node_info::Error::Validation;
use thiserror::Error;

#[derive(Debug, Error)]
Expand Down Expand Up @@ -116,9 +115,9 @@ impl NodeInfo {

#[cfg(test)]
mod tests {
use crate::handshake::envelope::Envelope;
use crate::handshake::node_info::{NodeInfo, NodeMetadata};
use libp2p::identity::Keypair;
use crate::handshake::envelope::Envelope;

#[test]
fn test_node_info_seal_consume() {
Expand Down
13 changes: 6 additions & 7 deletions anchor/network/src/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,21 @@ use libp2p::swarm::SwarmEvent;
use libp2p::{futures, gossipsub, identify, ping, PeerId, Swarm, SwarmBuilder};
use lighthouse_network::discovery::DiscoveredPeers;
use lighthouse_network::discv5::enr::k256::sha2::{Digest, Sha256};
use lighthouse_network::EnrExt;
use ssz::Decode;
use subnet_tracker::{SubnetEvent, SubnetId};
use task_executor::TaskExecutor;
use tokio::sync::mpsc;
use tracing::{debug, error, info, trace, warn};

use crate::behaviour::AnchorBehaviour;
use crate::behaviour::AnchorBehaviourEvent;
use crate::discovery::{Discovery, FIND_NODE_QUERY_CLOSEST_PEERS};
use crate::handshake::node_info::{NodeInfo, NodeMetadata};
use crate::keypair_utils::load_private_key;
use crate::transport::build_transport;
use crate::{handshake, Config};

use crate::handshake::node_info::{NodeInfo, NodeMetadata};
use crate::types::ssv_message::SignedSSVMessage;
use lighthouse_network::EnrExt;
use ssz::Decode;
use subnet_tracker::{SubnetEvent, SubnetId};
use tokio::sync::mpsc;
use crate::{handshake, Config};

pub struct Network {
swarm: Swarm<AnchorBehaviour>,
Expand Down

0 comments on commit e9df5ea

Please sign in to comment.