Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Better logging targets
  • Loading branch information
timorl committed Dec 16, 2022
commit ed1b0d05db30d595305aa3e043bf744c800e1f56
2 changes: 1 addition & 1 deletion finality-aleph/src/network/clique/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ mod service;
pub use crypto::{PublicKey, SecretKey};
pub use service::Service;

pub const LOG_TARGET: &str = "clique-network";
const LOG_TARGET: &str = "clique-network";

/// Network represents an interface for opening and closing connections with other nodes,
/// and sending direct messages between them.
Expand Down
4 changes: 3 additions & 1 deletion finality-aleph/src/network/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ use tokio::net::{
use crate::{
crypto::{verify, AuthorityPen, Signature},
network::{
clique::{ConnectionInfo, Dialer, Listener, PublicKey, SecretKey, Splittable, LOG_TARGET},
clique::{ConnectionInfo, Dialer, Listener, PublicKey, SecretKey, Splittable},
AddressingInformation, NetworkIdentity, PeerId,
},
};

const LOG_TARGET: &str = "tcp-network";

pub const KEY_TYPE: KeyTypeId = KeyTypeId(*b"a0vn");

impl ConnectionInfo for TcpStream {
Expand Down
4 changes: 3 additions & 1 deletion finality-aleph/src/testing/clique_network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ use crate::network::{
random_keys, Addresses, MockDialer, MockListener, MockPublicKey, MockSecretKey,
UnreliableConnectionMaker,
},
Network, SecretKey, Service, LOG_TARGET,
Network, SecretKey, Service,
},
mock::MockData,
};

pub const LOG_TARGET: &str = "clique-network-test";

const TWICE_MAX_DATA_SIZE: usize = 32 * 1024 * 1024;

#[allow(clippy::too_many_arguments)]
Expand Down