From 25644ae6b59faab32602ea180aa77f9adec65df4 Mon Sep 17 00:00:00 2001 From: oliveredget <188809800+oliveredget@users.noreply.github.com> Date: Tue, 31 Dec 2024 21:34:59 +0800 Subject: [PATCH] Fix typos Signed-off-by: oliveredget <188809800+oliveredget@users.noreply.github.com> --- consensus/core/src/core_thread.rs | 4 ++-- consensus/core/src/leader_scoring.rs | 2 +- consensus/core/src/linearizer.rs | 2 +- crates/sui/src/clever_error_rendering.rs | 2 +- crates/sui/src/client_ptb/parser.rs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/consensus/core/src/core_thread.rs b/consensus/core/src/core_thread.rs index d1cbc2ba22160..d76a30d059aa7 100644 --- a/consensus/core/src/core_thread.rs +++ b/consensus/core/src/core_thread.rs @@ -144,7 +144,7 @@ impl CoreThread { let exists = *self.rx_subscriber_exists.borrow(); self.core.set_subscriber_exists(exists); if !should_propose_before && self.core.should_propose() { - // If core cannnot propose before but can propose now, try to produce a new block to ensure liveness, + // If core cannot propose before but can propose now, try to produce a new block to ensure liveness, // because block proposal could have been skipped. self.core.new_block(Round::MAX, true)?; } @@ -159,7 +159,7 @@ impl CoreThread { state.accepted_quorum_rounds ); if !should_propose_before && self.core.should_propose() { - // If core cannnot propose before but can propose now, try to produce a new block to ensure liveness, + // If core cannot propose before but can propose now, try to produce a new block to ensure liveness, // because block proposal could have been skipped. self.core.new_block(Round::MAX, true)?; } diff --git a/consensus/core/src/leader_scoring.rs b/consensus/core/src/leader_scoring.rs index 51ab0a5e4aa2e..2b27df90157d3 100644 --- a/consensus/core/src/leader_scoring.rs +++ b/consensus/core/src/leader_scoring.rs @@ -182,7 +182,7 @@ pub(crate) struct ScoringSubdag { // TODO: Include skipped leaders as well pub(crate) leaders: HashSet, // A map of votes to the stake of strongly linked blocks that include that vote - // Note: Inlcuding stake aggregator so that we can quickly check if it exceeds + // Note: Including stake aggregator so that we can quickly check if it exceeds // quourum threshold and only include those scores for certain scoring strategies. pub(crate) votes: BTreeMap>, } diff --git a/consensus/core/src/linearizer.rs b/consensus/core/src/linearizer.rs index ec87c2b41f453..e93bc16fa6588 100644 --- a/consensus/core/src/linearizer.rs +++ b/consensus/core/src/linearizer.rs @@ -135,7 +135,7 @@ impl Linearizer { .filter(|ancestor| { // We skip the block if we already committed it or we reached a // round that we already committed. - // TODO: for Fast Path we need to ammend the recursion rule here and allow us to commit blocks all the way up to the `gc_round`. + // TODO: for Fast Path we need to amend the recursion rule here and allow us to commit blocks all the way up to the `gc_round`. // Some additional work will be needed to make sure that we keep the uncommitted blocks up to the `gc_round` across commits. !committed.contains(ancestor) && last_committed_rounds[ancestor.author] < ancestor.round diff --git a/crates/sui/src/clever_error_rendering.rs b/crates/sui/src/clever_error_rendering.rs index 725a48367aea3..f8873a47ca8da 100644 --- a/crates/sui/src/clever_error_rendering.rs +++ b/crates/sui/src/clever_error_rendering.rs @@ -5,7 +5,7 @@ //! error message using the clever error rendering logic. //! //! The logic in this file is largely a stop-gap to provide Clever Error rendering in the CLI while -//! it still uses the JSON-RPC API. The new GraphQL API already renderd Clever Errors on the server +//! it still uses the JSON-RPC API. The new GraphQL API already rendered Clever Errors on the server //! side in a much more robust and efficient way. //! //! Once the CLI is updated to use the GraphQL API, this file can be removed, and the GraphQL-based diff --git a/crates/sui/src/client_ptb/parser.rs b/crates/sui/src/client_ptb/parser.rs index e9e769a39cfa3..8f9a4ed4b5ec7 100644 --- a/crates/sui/src/client_ptb/parser.rs +++ b/crates/sui/src/client_ptb/parser.rs @@ -682,7 +682,7 @@ impl<'a, I: Iterator> ProgramParser<'a, I> { Ok(sp.wrap(addr)) } - /// Parse a numeric addres literal (must be prefixed by an `@` symbol). + /// Parse a numeric address literal (must be prefixed by an `@` symbol). fn parse_address_literal(&mut self) -> PTBResult> { let sp!(sp, _) = self.expect(Token::At).map_err(|e| { err!(e.span => help: {