From d5d2bc2363de5e1f73cb3d405ff1a2c2a130884d Mon Sep 17 00:00:00 2001 From: RiceChuan Date: Sat, 14 Dec 2024 21:42:16 +0800 Subject: [PATCH] docs: remove repetitive words Signed-off-by: RiceChuan --- core/src/consensus/heaviest_subtree_fork_choice.rs | 4 ++-- dos/src/main.rs | 2 +- sdk/program/src/secp256k1_recover.rs | 2 +- sdk/src/secp256k1_instruction.rs | 2 +- send-transaction-service/src/tpu_info.rs | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/src/consensus/heaviest_subtree_fork_choice.rs b/core/src/consensus/heaviest_subtree_fork_choice.rs index 9a67069c2dfefd..21500a3df03f91 100644 --- a/core/src/consensus/heaviest_subtree_fork_choice.rs +++ b/core/src/consensus/heaviest_subtree_fork_choice.rs @@ -3514,7 +3514,7 @@ mod test { (vote_pubkeys[1], duplicate_leaves_descended_from_5[0]), ]; - // The best slot should be the the smallest leaf descended from 4 + // The best slot should be the smallest leaf descended from 4 assert_eq!( heaviest_subtree_fork_choice.add_votes( pubkey_votes.iter(), @@ -3560,7 +3560,7 @@ mod test { .., ) = setup_mark_invalid_forks_duplicate_tests(); - // Marking candidate as valid again will choose the the heaviest leaf of + // Marking candidate as valid again will choose the heaviest leaf of // the newly valid branch let duplicate_slot = duplicate_leaves_descended_from_4[0].0; let duplicate_descendant = (duplicate_slot + 1, Hash::new_unique()); diff --git a/dos/src/main.rs b/dos/src/main.rs index 6b07eec6709a40..39b8421c405106 100644 --- a/dos/src/main.rs +++ b/dos/src/main.rs @@ -551,7 +551,7 @@ fn create_payers( // Assume that if we use valid blockhash, we also have a payer if valid_blockhash { // each payer is used to fund transaction - // transactions are built to be invalid so the the amount here is arbitrary + // transactions are built to be invalid so the amount here is arbitrary let funding_key = Keypair::new(); let funding_key = Arc::new(funding_key); let res = generate_and_fund_keypairs( diff --git a/sdk/program/src/secp256k1_recover.rs b/sdk/program/src/secp256k1_recover.rs index f688e7d485497e..6c47cbdc183051 100644 --- a/sdk/program/src/secp256k1_recover.rs +++ b/sdk/program/src/secp256k1_recover.rs @@ -233,7 +233,7 @@ impl Secp256k1Pubkey { /// lengths of `hash` and `signature` beforehand. /// /// When run on-chain this function will not directly validate the lengths of -/// `hash` and `signature`. It will assume they are the the correct lengths and +/// `hash` and `signature`. It will assume they are the correct lengths and /// pass their pointers to the runtime, which will interpret them as 32-byte and /// 64-byte buffers. If the provided slices are too short, the runtime will read /// invalid data and attempt to interpret it, most likely returning an error, diff --git a/sdk/src/secp256k1_instruction.rs b/sdk/src/secp256k1_instruction.rs index a7bdff0b6dfb22..97d61b52df42b3 100644 --- a/sdk/src/secp256k1_instruction.rs +++ b/sdk/src/secp256k1_instruction.rs @@ -98,7 +98,7 @@ //! Many steps must be done manually. //! //! The `solana_program` crate provides no APIs to assist in interpreting -//! the the secp256k1 instruction data. It must be done manually. +//! the secp256k1 instruction data. It must be done manually. //! //! The secp256k1 program is implemented with the [`libsecp256k1`] crate, //! which clients may also want to use. diff --git a/send-transaction-service/src/tpu_info.rs b/send-transaction-service/src/tpu_info.rs index 456a0ced0d3304..9ea4cc782c95c3 100644 --- a/send-transaction-service/src/tpu_info.rs +++ b/send-transaction-service/src/tpu_info.rs @@ -3,7 +3,7 @@ use {solana_client::connection_cache::Protocol, solana_sdk::clock::Slot, std::ne pub trait TpuInfo { fn refresh_recent_peers(&mut self); fn get_leader_tpus(&self, max_count: u64, protocol: Protocol) -> Vec<&SocketAddr>; - /// In addition to the the tpu address, also return the leader slot + /// In addition to the tpu address, also return the leader slot fn get_leader_tpus_with_slots( &self, max_count: u64,