Skip to content
Open
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
2 changes: 1 addition & 1 deletion core/src/app_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion core/src/data/keys.rs
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions core/src/network/p2p/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -750,7 +750,7 @@ impl Client {
peers: Vec<PeerId>,
) -> 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(),
Expand Down
2 changes: 1 addition & 1 deletion core/src/network/p2p/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down
4 changes: 2 additions & 2 deletions core/src/network/p2p/event_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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."
);
Expand Down
2 changes: 1 addition & 1 deletion core/src/network/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion core/src/updater/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
2 changes: 1 addition & 1 deletion core/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ pub fn install_panic_hooks(shutdown: Controller<String>) -> 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));
Expand Down