Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
rex4539 committed Jan 5, 2024
1 parent 50caebb commit b9b95ed
Show file tree
Hide file tree
Showing 14 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion apps/src/lib/node/ledger/shell/init_chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ where
#[cfg(any(test, feature = "testing"))]
_num_validators,
);
// propogate errors or panic
// propagate errors or panic
validation.error_out()?;

// Init masp commitment tree and anchor
Expand Down
8 changes: 4 additions & 4 deletions core/src/ledger/governance/cli/onchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,22 +271,22 @@ impl PgfAction {
}
}

/// Pgf fundings
/// Pgf funding
#[derive(
Debug, Clone, BorshSerialize, BorshDeserialize, Serialize, Deserialize,
)]
pub struct PgfFunding {
/// Pgf continuous funding
pub continuous: Vec<PgfFundingTarget>,
/// pgf retro fundings
/// pgf retro funding
pub retro: Vec<PgfFundingTarget>,
}

/// Pgf continous funding
/// Pgf continuous funding
#[derive(
Debug, Clone, BorshSerialize, BorshDeserialize, Serialize, Deserialize,
)]
pub struct PgfContinous {
pub struct PgfContinuous {
/// Pgf target
pub target: PgfFundingTarget,
/// Pgf action
Expand Down
10 changes: 5 additions & 5 deletions core/src/ledger/governance/storage/proposal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use serde::{Deserialize, Serialize};
use thiserror::Error;

use crate::ledger::governance::cli::onchain::{
PgfAction, PgfContinous, PgfRetro, PgfSteward, StewardsUpdate,
PgfAction, PgfContinuous, PgfRetro, PgfSteward, StewardsUpdate,
};
use crate::ledger::governance::utils::{ProposalStatus, TallyType};
use crate::ledger::storage_api::token::Amount;
Expand All @@ -21,7 +21,7 @@ pub enum ProposalTypeError {
InvalidProposalType,
}

/// Storage structure for pgf fundings
/// Storage structure for pgf funding
#[derive(
Debug,
Clone,
Expand Down Expand Up @@ -168,10 +168,10 @@ impl TryFrom<PgfSteward> for AddRemove<Address> {
}
}

impl TryFrom<PgfContinous> for PGFAction {
impl TryFrom<PgfContinuous> for PGFAction {
type Error = ProposalTypeError;

fn try_from(value: PgfContinous) -> Result<Self, Self::Error> {
fn try_from(value: PgfContinuous) -> Result<Self, Self::Error> {
match value.action {
PgfAction::Add => {
Ok(PGFAction::Continuous(AddRemove::Add(PGFTarget {
Expand Down Expand Up @@ -201,7 +201,7 @@ impl TryFrom<PgfRetro> for PGFAction {
}

#[derive(Debug, Clone, BorshSerialize, BorshDeserialize)]
/// Proposal rappresentation when fetched from the storage
/// Proposal representation when fetched from the storage
pub struct StorageProposal {
/// The proposal id
pub id: u64,
Expand Down
2 changes: 1 addition & 1 deletion core/src/ledger/governance/storage/vote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ pub mod testing {
use super::*;

prop_compose! {
/// Geerate an arbitrary vote type
/// Generate an arbitrary vote type
pub fn arb_vote_type()(discriminant in 0..3) -> VoteType {
match discriminant {
0 => VoteType::Default,
Expand Down
2 changes: 1 addition & 1 deletion documentation/dev/assets/mermaid.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions encoding_spec/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,11 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
// tables.push(pos_bonds_table);

// Then add the rest of definitions sorted by their names
for (declaration, defition) in definitions
for (declaration, definition) in definitions
.into_iter()
.sorted_by_key(|(key, _val)| key.clone())
{
tables.push(definition_to_table(&declaration, defition))
tables.push(definition_to_table(&declaration, definition))
}

// Print the tables to markdown
Expand Down
2 changes: 1 addition & 1 deletion examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ This directory contains examples and additional tooling to help in the
development of Namada. The currently provided examples are listed below:
## `generate-txs`
This utility serves to randomly generate Namada transaction test vectors
offline. These test vectors are useful for ensuring compatability with hardware
offline. These test vectors are useful for ensuring compatibility with hardware
wallets. This example is included in the Namada repository in order to ensure
that the test vector generation logic is maintained and remains up to date with
the latest changes in transaction formats.
Expand Down
2 changes: 1 addition & 1 deletion light_sdk/src/reading/tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use namada_sdk::rpc::{TxEventQuery, TxResponse};
use super::*;

/// Call the corresponding `tx_event_query` RPC method, to fetch
/// the current status of a transation.
/// the current status of a transaction.
pub fn query_tx_events(
tendermint_addr: &str,
tx_hash: &str,
Expand Down
2 changes: 1 addition & 1 deletion proof_of_stake/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,7 @@ where
remaining = token::Amount::zero();

// NOTE: When there are multiple `src_validators` from which we're
// unbonding, `validator_to_modify` cannot get overriden, because
// unbonding, `validator_to_modify` cannot get overridden, because
// only one of them can be a partial unbond (`new_entry`
// is partial unbond)
if let Some((bond_epoch, new_bond_amount)) =
Expand Down
6 changes: 3 additions & 3 deletions proof_of_stake/src/slashing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ where
/// In the context of a redelegation, the function computes how much a validator
/// (the destination validator of the redelegation) should be slashed due to the
/// misbehaving of a second validator (the source validator of the
/// redelegation). The function computes how much the validator whould be
/// redelegation). The function computes how much the validator would be
/// slashed at all epochs between the current epoch (curEpoch) + 1 and the
/// current epoch + 1 + PIPELINE_OFFSET, accounting for any tokens of the
/// redelegation already unbonded.
Expand Down Expand Up @@ -815,7 +815,7 @@ where
}

/// Compute a token amount after slashing, given the initial amount and a set of
/// slashes. It is assumed that the input `slashes` are those commited while the
/// slashes. It is assumed that the input `slashes` are those committed while the
/// `amount` was contributing to voting power.
pub fn get_slashed_amount(
params: &PosParams,
Expand Down Expand Up @@ -986,7 +986,7 @@ where

/// Process a slash by (i) slashing the misbehaving validator; and (ii) any
/// validator to which it has redelegated some tokens and the slash misbehaving
/// epoch is wihtin the redelegation slashing window.
/// epoch is within the redelegation slashing window.
///
/// `validator` - the misbehaving validator.
/// `slash_rate` - the slash rate.
Expand Down
4 changes: 2 additions & 2 deletions proof_of_stake/src/tests/test_helper_fns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2000,13 +2000,13 @@ fn test_from_sm_case_1() {
let (new_entry_epoch, new_bond_amount) = bonds_to_unbond.new_entry.unwrap();
assert_eq!(outer_epoch_1, new_entry_epoch);
// The modified bond should be sum of all redelegations less the unbonded
// amouunt
// amount
assert_eq!(
epoch_1_redeleg_1 + epoch_1_redeleg_2 + epoch_2_redeleg_2
- unbond_amount,
new_bond_amount
);
// The current bond should be sum of redelegations fom the modified epoch
// The current bond should be sum of redelegations from the modified epoch
let cur_bond_amount = bonds_handle
.get_delta_val(&storage, new_entry_epoch)
.unwrap()
Expand Down
2 changes: 1 addition & 1 deletion shared/src/ledger/pgf/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl ProposalEvent {
("target".to_string(), target.to_string()),
("amount".to_string(), amount.to_string_native()),
("is_steward".to_string(), is_steward.to_string()),
("successed".to_string(), success.to_string()),
("success".to_string(), success.to_string()),
]);
Self {
event_type,
Expand Down
4 changes: 2 additions & 2 deletions tests/src/e2e/ledger_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2362,10 +2362,10 @@ fn pgf_governance_proposal() -> Result<()> {
epoch = get_epoch(&test, &validator_one_rpc).unwrap();
}

// 14. Query pgf fundings
// 14. Query pgf funding
let query_pgf = vec!["query-pgf", "--node", &validator_one_rpc];
let mut client = run!(test, Bin::Client, query_pgf, Some(30))?;
client.exp_string("Pgf fundings")?;
client.exp_string("Pgf funding")?;
client.exp_string(&format!(
"{} for {}",
bertha,
Expand Down
4 changes: 2 additions & 2 deletions tests/src/integration/masp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1250,8 +1250,8 @@ fn wrapper_fee_unshielding() -> Result<()> {
Ok(())
}

// Test that a masp unshield transaction can be succesfully executed even across
// an epoch boundary.
// Test that a masp unshield transaction can be successfully executed even
// across an epoch boundary.
#[test]
fn cross_epoch_tx() -> Result<()> {
// This address doesn't matter for tests. But an argument is required.
Expand Down

0 comments on commit b9b95ed

Please sign in to comment.