diff --git a/core/src/app_client.rs b/core/src/app_client.rs index 771a32fa7..b62e665ff 100644 --- a/core/src/app_client.rs +++ b/core/src/app_client.rs @@ -431,7 +431,7 @@ async fn process_block( /// # Arguments /// /// * `cfg` - Application client configuration -/// * `db` - Database to store data inot DB +/// * `db` - Database to store data into DB /// * `network_client` - Reference to a libp2p custom network client /// * `rpc_client` - Node's RPC subxt client for fetching data unavailable in DHT (if configured) /// * `app_id` - Application ID diff --git a/core/src/data/keys.rs b/core/src/data/keys.rs index 3c890902a..3458fbaa6 100644 --- a/core/src/data/keys.rs +++ b/core/src/data/keys.rs @@ -1,4 +1,4 @@ -/// Keys predefined for persistance: +/// Keys predefined for persistence: /// App ID prefix used with App Data key pub const APP_ID_PREFIX: &str = "app_id"; /// Prefix used with current Block Header key diff --git a/core/src/network/p2p/client.rs b/core/src/network/p2p/client.rs index 7a01883f8..b0b9c077d 100644 --- a/core/src/network/p2p/client.rs +++ b/core/src/network/p2p/client.rs @@ -733,7 +733,7 @@ impl Client { async fn insert_into_dht(&self, records: Vec<(String, Record)>, block_num: u32) -> Result<()> { if records.is_empty() { - return Err(eyre!("Cant send empty record list.")); + return Err(eyre!("Can't send empty record list.")); } self.put_kad_record( records.into_iter().map(|e| e.1).collect(), @@ -750,7 +750,7 @@ impl Client { peers: Vec, ) -> Result<()> { if records.is_empty() { - return Err(eyre!("Cant send empty record list.")); + return Err(eyre!("Can't send empty record list.")); } self.put_kad_record_to( records.into_iter().map(|e| e.1).collect(), diff --git a/core/src/network/p2p/configuration.rs b/core/src/network/p2p/configuration.rs index 62e764e0c..0aefe3f46 100644 --- a/core/src/network/p2p/configuration.rs +++ b/core/src/network/p2p/configuration.rs @@ -130,7 +130,7 @@ pub struct KademliaConfig { /// Default Kademlia config values have been copied from rust-libp2p Kademila defaults /// /// Time-to-live for DHT entries in seconds (default: 24h). - /// Default value is set for light clients. Due to the heavy duty nature of the fat clients, it is recommended to be set far bellow this + /// Default value is set for light clients. Due to the heavy-duty nature of fat clients, it is recommended to be set far below this /// value - not greater than 1hr. /// Record TTL, publication and replication intervals are co-dependent, meaning that TTL >> publication_interval >> replication_interval. #[serde(with = "duration_seconds_format")] diff --git a/core/src/network/p2p/event_loop.rs b/core/src/network/p2p/event_loop.rs index e252a18e2..b7d7e8990 100644 --- a/core/src/network/p2p/event_loop.rs +++ b/core/src/network/p2p/event_loop.rs @@ -553,10 +553,10 @@ impl EventLoop { listen_addrs, kad_protocol_name, ) { - Ok(addreses) => { + Ok(addresses) => { if let Some(kad) = self.swarm.behaviour_mut().kademlia.as_mut() { - for addr in &addreses { + for addr in &addresses { trace!( "Adding peer {addr}/{peer_id} to routing table." ); diff --git a/core/src/network/rpc.rs b/core/src/network/rpc.rs index 8567e2199..415919a05 100644 --- a/core/src/network/rpc.rs +++ b/core/src/network/rpc.rs @@ -297,7 +297,7 @@ pub async fn wait_for_finalized_header( } // silently skip ConnectedHost event } - Err(eyre!("RPC event receiver chanel closed")) + Err(eyre!("RPC event receiver channel closed")) }) .await; diff --git a/core/src/updater/mod.rs b/core/src/updater/mod.rs index f4b5efd3b..f272bddf1 100644 --- a/core/src/updater/mod.rs +++ b/core/src/updater/mod.rs @@ -200,7 +200,7 @@ pub async fn run( // Check for new releases every 180 blocks (1 hour) const CHECK_INTERVAL: u64 = 180; - // Use randomized delays_sec to pospone check interval and distribute the GitHub API requests + // Use randomized delays_sec to postpone check interval and distribute the GitHub API requests let delay_blocks = (delay_sec % CHECK_INTERVAL) as u32; let version = Version::parse(version).expect("Version is valid"); diff --git a/core/src/utils.rs b/core/src/utils.rs index 2a86b75e4..0918f61c1 100644 --- a/core/src/utils.rs +++ b/core/src/utils.rs @@ -179,7 +179,7 @@ pub fn install_panic_hooks(shutdown: Controller) -> Result<()> { std::panic::set_hook(Box::new(move |panic_info| { // trigger shutdown to stop other tasks if panic occurs - let _ = shutdown.trigger_shutdown("Panic occurred, shuting down".to_string()); + let _ = shutdown.trigger_shutdown("Panic occurred, shutting down".to_string()); let msg = format!("{}", panic_hook.panic_report(panic_info)); error!("Error: {}", strip_ansi_escapes::strip_str(msg));