Skip to content

Commit b96ba7d

Browse files
fix: correct spelling (#1554)
1 parent dd4d04f commit b96ba7d

File tree

11 files changed

+20
-91
lines changed

11 files changed

+20
-91
lines changed

programs/compressed-token/src/freeze.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ fn create_token_output_accounts<const IS_FROZEN: bool>(
165165
state,
166166
tlv: None,
167167
};
168-
token_data.serialize(&mut token_data_bytes).unwrap();
168+
token_data.serialize(&mut token_data_bytes)?;
169169

170170
let data_hash = token_data.hash::<Poseidon>().map_err(ProgramError::from)?;
171171
let data: CompressedAccountData = CompressedAccountData {

programs/registry/src/account_compression_cpi/initialize_batched_state_tree.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ use crate::protocol_config::state::ProtocolConfigPda;
88
pub struct InitializeBatchedStateMerkleTreeAndQueue<'info> {
99
#[account(mut)]
1010
pub authority: Signer<'info>,
11-
/// CHECK: initializated in account compression program.
11+
/// CHECK: initialized in account compression program.
1212
#[account(zero)]
1313
pub merkle_tree: AccountInfo<'info>,
14-
/// CHECK: initializated in account compression program.
14+
/// CHECK: initialized in account compression program.
1515
#[account(zero)]
1616
pub queue: AccountInfo<'info>,
1717
/// CHECK: (account compression program) access control.

programs/registry/src/account_compression_cpi/rollover_batched_address_tree.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub struct RolloverBatchedAddressMerkleTree<'info> {
1111
pub registered_forester_pda: Option<Account<'info, ForesterEpochPda>>,
1212
#[account(mut)]
1313
pub authority: Signer<'info>,
14-
/// CHECK: initializated in account compression program.
14+
/// CHECK: initialized in account compression program.
1515
#[account(zero)]
1616
pub new_address_merkle_tree: AccountInfo<'info>,
1717
/// CHECK: in account compression program.

programs/registry/src/account_compression_cpi/rollover_batched_state_tree.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ pub struct RolloverBatchedStateMerkleTree<'info> {
1111
pub registered_forester_pda: Option<Account<'info, ForesterEpochPda>>,
1212
#[account(mut)]
1313
pub authority: Signer<'info>,
14-
/// CHECK: initializated in account compression program.
14+
/// CHECK: initialized in account compression program.
1515
#[account(zero)]
1616
pub new_state_merkle_tree: AccountInfo<'info>,
1717
/// CHECK: in account compression program.
1818
#[account(mut)]
1919
pub old_state_merkle_tree: AccountInfo<'info>,
20-
/// CHECK: initializated in account compression program.
20+
/// CHECK: initialized in account compression program.
2121
#[account(zero)]
2222
pub new_output_queue: AccountInfo<'info>,
2323
/// CHECK: in account compression program.

programs/registry/src/epoch/register_epoch.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,17 @@ pub struct ForesterEpochPda {
4545

4646
impl ForesterEpochPda {
4747
pub fn get_current_light_slot(&self, current_solana_slot: u64) -> Result<u64> {
48-
let epoch_progres =
48+
let epoch_progress =
4949
match current_solana_slot.checked_sub(self.epoch_active_phase_start_slot) {
50-
Some(epoch_progres) => epoch_progres,
50+
Some(epoch_progress) => epoch_progress,
5151
None => return err!(RegistryError::EpochEnded),
5252
};
53-
Ok(epoch_progres / self.protocol_config.slot_length)
53+
Ok(epoch_progress / self.protocol_config.slot_length)
5454
}
5555

5656
/// Returns the forester index for the current slot. The forester whose
5757
/// weighted range [total_registered_weight_at_registration,
58-
/// total_registered_weight_at_registration + forester_weight ) contains the
58+
/// total_registered_weight_at_registration + forester_weight] contains the
5959
/// forester index is eligible to perform work. If a forester has more
6060
/// weight the range is larger -> the forester is eligible for more slots.
6161
/// The forester index is a random number, derived from queue pubkey, epoch,
@@ -163,7 +163,7 @@ pub struct RegisterForesterEpoch<'info> {
163163
pub authority: Signer<'info>,
164164
#[account(has_one = authority)]
165165
pub forester_pda: Account<'info, ForesterPda>,
166-
/// Instruction checks that current_epoch is the the current epoch and that
166+
/// Instruction checks that current_epoch is the current epoch and that
167167
/// the epoch is in registration phase.
168168
#[account(init, seeds = [FORESTER_EPOCH_SEED, forester_pda.key().to_bytes().as_slice(), current_epoch.to_le_bytes().as_slice()], bump, space =ForesterEpochPda::LEN , payer = fee_payer)]
169169
pub forester_epoch_pda: Account<'info, ForesterEpochPda>,
@@ -187,7 +187,7 @@ pub struct RegisterForesterEpoch<'info> {
187187
/// - should only be created once
188188
/// - contains the protocol config to set the protocol config for that epoch
189189
/// (changes to protocol config take effect with next epoch)
190-
/// - collectes the active weight of registered foresters
190+
/// - collects the active weight of registered foresters
191191
///
192192
/// Forester Epoch Account:
193193
/// - should only be created in epoch registration period

programs/registry/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ pub mod light_registry {
571571
msg!("Trees without a network fee will not be serviced by light foresters.");
572572
return err!(RegistryError::ForesterUndefined);
573573
}
574-
process_initialize_batched_address_merkle_tree(&ctx, bump, params.try_to_vec().unwrap())
574+
process_initialize_batched_address_merkle_tree(&ctx, bump, params.try_to_vec()?)
575575
}
576576

577577
pub fn batch_update_address_tree<'info>(

programs/registry/src/protocol_config/update.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ pub fn check_protocol_config(protocol_config: ProtocolConfig) -> Result<()> {
3737
}
3838
if protocol_config.active_phase_length < protocol_config.slot_length {
3939
msg!(
40-
"Active phase length is less than slot length, active phase length {} < slot length {}. (Active phase lenght must be greater than slot length.)",
40+
"Active phase length is less than slot length, active phase length {} < slot length {}. (Active phase length must be greater than slot length.)",
4141
protocol_config.active_phase_length,
4242
protocol_config.slot_length
4343
);

programs/system/src/invoke_cpi/instruction.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ impl<'info> InvokeAccounts<'info> for InvokeCpiInstruction<'info> {
6262
&self.account_compression_program
6363
}
6464

65+
fn get_system_program(&self) -> &Program<'info, System> {
66+
&self.system_program
67+
}
68+
6569
fn get_sol_pool_pda(&self) -> Option<&AccountInfo<'info>> {
6670
self.sol_pool_pda.as_ref()
6771
}
6872

6973
fn get_decompression_recipient(&self) -> Option<&AccountInfo<'info>> {
7074
self.decompression_recipient.as_ref()
7175
}
72-
73-
fn get_system_program(&self) -> &Program<'info, System> {
74-
&self.system_program
75-
}
7676
}

programs/system/src/invoke_cpi/process_cpi_context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ pub fn set_cpi_context(
107107

108108
// Expected usage:
109109
// 1. The first invocation is marked with
110-
// No need to store the proof (except in first invokation),
110+
// No need to store the proof (except in first invocation),
111111
// cpi context, compress_or_decompress_lamports,
112112
// relay_fee
113113
// 2. Subsequent invocations check the proof and fee payer

programs/system/src/invoke_cpi/processor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use crate::{
1414

1515
/// Processes an `InvokeCpi` instruction.
1616
/// Checks:
17-
/// 1. signer checks (inputs), writeaccess (outputs) (cpi_signer_checks)
17+
/// 1. signer checks (inputs), write access (outputs) (cpi_signer_checks)
1818
/// 2. sets or gets cpi context (process_cpi_context)
1919
#[allow(unused_mut)]
2020
pub fn process_invoke_cpi<'a, 'b, 'c: 'info + 'b, 'info>(

0 commit comments

Comments
 (0)