Skip to content

Commit

Permalink
Fix typos in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Jurshsmith committed Apr 20, 2024
1 parent 087cdd6 commit 7d33860
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions chaindexing/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ impl std::fmt::Debug for ConfigError {
}

/// Used to configure managing a chaindexing's node heartbeat
/// based on activities from one's Dapp to achieve ergonomic
/// ingesting to cut down RPC drastically
/// to cut down JSON-RPC's (Alchemy, Infura, etc.) cost.
#[derive(Clone, Debug)]
pub struct OptimizationConfig {
pub(crate) node_heartbeat: NodeHeartbeat,
Expand Down
3 changes: 2 additions & 1 deletion chaindexing/src/nodes/node_heartbeat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use tokio::sync::Mutex;

/// A chaindexing node's heartbeat.
/// In a distributed environment, this is useful for managing the indexer's
/// processes such that RPC costs can be reduced based on triggering activities
/// processes manually. A popular motivation to do is to reduce RPC's cost.
#[derive(Clone, Debug)]
pub struct NodeHeartbeat {
/// Both in milliseconds
Expand All @@ -22,6 +22,7 @@ impl NodeHeartbeat {
active_grace_period: active_grace_period_ms,
}
}
/// Keeps your chaindexing node alive
pub async fn keep_alive(&self) {
let mut last_keep_alive_at = self.last_keep_alive_at.lock().await;
*last_keep_alive_at = Self::now();
Expand Down

0 comments on commit 7d33860

Please sign in to comment.