Skip to content

Commit

Permalink
Merge pull request #3589 from anoma/brent/misc-improvements
Browse files Browse the repository at this point in the history
Various misc improvements
  • Loading branch information
mergify[bot] authored Aug 9, 2024
2 parents ee5140a + ae5fda1 commit 1a8376e
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 14 deletions.
2 changes: 2 additions & 0 deletions .changelog/unreleased/improvements/3589-misc-improvements.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Fxing comments and strings.
([\#3589](https://github.com/anoma/namada/pull/3589))
2 changes: 1 addition & 1 deletion crates/apps_lib/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2281,7 +2281,7 @@ pub mod cmds {
fn def() -> App {
App::new(Self::CMD)
.about(wrap!(
"Submit a tx to reveal the public key an implicit \
"Submit a tx to reveal the public key of an implicit \
account. Typically, you don't have to do this manually \
and the client will detect when a tx to reveal PK is \
needed and submit it automatically. This will write the \
Expand Down
6 changes: 3 additions & 3 deletions crates/apps_lib/src/client/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ pub async fn query_protocol_parameters(
display_line!(context.io(), "{:8}{}: {:?}", "", token, gas_cost);
}

display_line!(context.io(), "PoS parameters");
display_line!(context.io(), "\nPoS parameters");
let pos_params = query_pos_parameters(context.client()).await;
display_line!(
context.io(),
Expand Down Expand Up @@ -697,9 +697,9 @@ pub async fn query_protocol_parameters(
);
display_line!(
context.io(),
"{:4}Validator stake threshold: {}",
"{:4}Validator stake threshold: {} NAM",
"",
pos_params.validator_stake_threshold
pos_params.validator_stake_threshold.to_string_native()
);
display_line!(
context.io(),
Expand Down
3 changes: 2 additions & 1 deletion crates/core/src/address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ impl Display for InternalAddress {
Self::Erc20(eth_addr) => format!("Erc20: {}", eth_addr),
Self::Nut(eth_addr) => format!("Non-usable token: {eth_addr}"),
Self::Multitoken => "Multitoken".to_string(),
Self::Pgf => "PublicGoodFundings".to_string(),
Self::Pgf => "PGF".to_string(),
Self::Masp => "MASP".to_string(),
Self::ReplayProtection => "ReplayProtection".to_string(),
Self::TempStorage => "TempStorage".to_string(),
Expand All @@ -629,6 +629,7 @@ impl InternalAddress {
"governance" => Some(InternalAddress::Governance),
"masp" => Some(InternalAddress::Masp),
"replayprotection" => Some(InternalAddress::ReplayProtection),
"pgf" => Some(InternalAddress::Pgf),
_ => None,
}
}
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/uint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ impl Uint {
}

/// The maximum absolute value a [`I256`] may have.
/// Note the the last digit is 2^63 - 1. We add this cap so
/// Note the last digit is 2^63 - 1. We add this cap so
/// we can use two's complement.
pub const MAX_SIGNED_VALUE: Uint =
Uint([u64::MAX, u64::MAX, u64::MAX, 9223372036854775807]);
Expand Down
2 changes: 1 addition & 1 deletion crates/node/src/ethereum_oracle/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub mod eth_events {

impl PendingEvent {
/// Decodes bytes into an [`EthereumEvent`] based on the signature.
/// This is is turned into a [`PendingEvent`] along with the block
/// This is turned into a [`PendingEvent`] along with the block
/// height passed in here.
///
/// If the event contains a confirmations field,
Expand Down
4 changes: 2 additions & 2 deletions crates/parameters/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ where
.into_storage_result()
}

/// Read the the epoch duration parameter from store
/// Read the epoch duration parameter from store
pub fn read_epoch_duration_parameter<S>(
storage: &S,
) -> namada_storage::Result<EpochDuration>
Expand All @@ -312,7 +312,7 @@ where
.into_storage_result()
}

/// Read the the masp epoch multiplier parameter from store
/// Read the masp epoch multiplier parameter from store
pub fn read_masp_epoch_multiplier_parameter<S>(
storage: &S,
) -> namada_storage::Result<u64>
Expand Down
4 changes: 2 additions & 2 deletions crates/proof_of_stake/src/tests/test_validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ fn test_validator_sets() {
);
assert_eq!(tm_updates[1], ValidatorSetUpdate::Deactivated(pk2));

// Unbond some stake from val1, it should be be swapped with the greatest
// Unbond some stake from val1, it should be swapped with the greatest
// below-capacity validator val2 into the below-capacity set. The stake of
// val1 will go below 1 NAM, which is the validator_stake_threshold, so it
// will enter the below-threshold validator set.
Expand Down Expand Up @@ -836,7 +836,7 @@ fn test_validator_sets() {
);
assert_eq!(tm_updates[1], ValidatorSetUpdate::Deactivated(pk1));

// Bond some stake to val6, it should be be swapped with the lowest
// Bond some stake to val6, it should be swapped with the lowest
// consensus validator val2 into the consensus set
let bond = token::Amount::from_uint(500_000, 0).unwrap();
let stake6 = stake6 + bond;
Expand Down
4 changes: 2 additions & 2 deletions crates/tests/src/e2e/ledger_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,7 @@ where
/// 4. Run it to get it to double vote and sign blocks
/// 5. Submit a valid token transfer tx to validator 0
/// 6. Wait for double signing evidence
/// 7. Make sure the the first validator can proceed to the next epoch
/// 7. Make sure the first validator can proceed to the next epoch
#[test]
fn double_signing_gets_slashed() -> Result<()> {
use std::net::SocketAddr;
Expand Down Expand Up @@ -1362,7 +1362,7 @@ fn double_signing_gets_slashed() -> Result<()> {
.exp_regex(r"Validator [a-z0-9]+ is in the .* set")
.unwrap();

// 7. Make sure the the first validator can proceed to the next epoch
// 7. Make sure the first validator can proceed to the next epoch
epoch_sleep(&test, &validator_one_rpc, 120)?;

// Make sure there are no errors
Expand Down
2 changes: 1 addition & 1 deletion crates/vm/src/wasm/compilation_cache/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ impl<N: CacheName, A: WasmCacheAccess> Cache<N, A> {
/// Get a WASM module from LRU cache, from a file or compile it and cache
/// it. If the cache access is set to [`crate::WasmCacheRwAccess`], it
/// updates the position in the LRU cache. Otherwise, the compiled
/// module will not be be cached, if it's not already.
/// module will not be cached, if it's not already.
pub fn fetch(
&mut self,
code_hash: &Hash,
Expand Down

0 comments on commit 1a8376e

Please sign in to comment.