Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Use non-binary pronouns in comments. (#13209)
Browse files Browse the repository at this point in the history
* use non binary pronouns in comments

* cargo fmt

* fix the use of "it" with "they" when dealing about an opperations identity
  • Loading branch information
DanHenton committed Jan 27, 2023
1 parent ff9921a commit 248fdf0
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 18 deletions.
2 changes: 1 addition & 1 deletion bin/utils/subkey/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ Secret Key URI `0x8c9a73097f235b84021a446bc2826a00c690ea0be3e0d81a84931cb4146d66
SS58 Address: 1bobYxBPjZWRPbVo35aSwci1u5Zmq8P6J2jpa4kkudBZMqE
```

`Bob` now got a nice address starting with his name: 1**bob**YxBPjZWRPbVo35aSwci1u5Zmq8P6J2jpa4kkudBZMqE.
`Bob` now got a nice address starting with their name: 1**bob**YxBPjZWRPbVo35aSwci1u5Zmq8P6J2jpa4kkudBZMqE.

**Note**: While `Bob`, having a short name (3 chars), got a result rather quickly, it will take much longer for `Alice` who has a much longer name, thus the chances to generate a random address that contains the chain `alice` will be much smaller.

Expand Down
7 changes: 4 additions & 3 deletions client/beefy/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ impl BeefyTestNet {
) -> Vec<H256> {
let mut all_hashes = Vec::with_capacity(count + 1);

// make sure genesis is the only block in network, so we can insert genesis at he beginning
// make sure genesis is the only block in network, so we can insert genesis at the beginning
// of hashes, otherwise indexing would be broken
assert!(self.peer(0).client().as_backend().blockchain().hash(1).unwrap().is_none());

Expand Down Expand Up @@ -926,7 +926,8 @@ async fn on_demand_beefy_justification_sync() {
)
.await;

// Spawn Dave, he's now way behind voting and can only catch up through on-demand justif sync.
// Spawn Dave, they are now way behind voting and can only catch up through on-demand justif
// sync.
tokio::spawn(dave_task);
// give Dave a chance to spawn and init.
run_for(Duration::from_millis(400), &net).await;
Expand All @@ -937,7 +938,7 @@ async fn on_demand_beefy_justification_sync() {
client.finalize_block(hashes[1], None).unwrap();
// Give Dave task some cpu cycles to process the finality notification,
run_for(Duration::from_millis(100), &net).await;
// freshly spun up Dave now needs to listen for gossip to figure out the state of his peers.
// freshly spun up Dave now needs to listen for gossip to figure out the state of their peers.

// Have the other peers do some gossip so Dave finds out about their progress.
finalize_block_and_wait_for_beefy(&net, fast_peers, &[hashes[25]], &[25]).await;
Expand Down
2 changes: 1 addition & 1 deletion client/consensus/babe/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1494,7 +1494,7 @@ where
// this way we can revert it if there's any error
let mut old_epoch_changes = None;

// Use an extra scope to make the compiler happy, because otherwise he complains about the
// Use an extra scope to make the compiler happy, because otherwise it complains about the
// mutex, even if we dropped it...
let mut epoch_changes = {
let mut epoch_changes = self.epoch_changes.shared_data_locked();
Expand Down
4 changes: 2 additions & 2 deletions docs/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ Detailed logs may be shown by running the node with the following environment va

If you want to see the multi-node consensus algorithm in action locally, then you can create a local testnet with two validator nodes for Alice and Bob, who are the initial authorities of the genesis chain specification that have been endowed with a testnet DOTs. We'll give each node a name and expose them so they are listed on link:https://telemetry.polkadot.io/#/Local%20Testnet[Telemetry]. You'll need two terminal windows open.

We'll start Alice's Substrate node first on default TCP port 30333 with her chain database stored locally at `/tmp/alice`. The Bootnode ID of her node is `QmRpheLN4JWdAnY7HGJfWFNbfkQCb6tFf4vvA6hgjMZKrR`, which is generated from the `--node-key` value that we specify below:
We'll start Alice's Substrate node first on default TCP port 30333 with their chain database stored locally at `/tmp/alice`. The Bootnode ID of Alice's node is `QmRpheLN4JWdAnY7HGJfWFNbfkQCb6tFf4vvA6hgjMZKrR`, which is generated from the `--node-key` value that we specify below:

[source, shell]
cargo run --release \-- \
Expand All @@ -308,7 +308,7 @@ cargo run --release \-- \
--telemetry-url 'ws://telemetry.polkadot.io:1024 0' \
--validator

In the second terminal, we'll run the following to start Bob's Substrate node on a different TCP port of 30334, and with his chain database stored locally at `/tmp/bob`. We'll specify a value for the `--bootnodes` option that will connect his node to Alice's Bootnode ID on TCP port 30333:
In the second terminal, we'll run the following to start Bob's Substrate node on a different TCP port of 30334, and with their chain database stored locally at `/tmp/bob`. We'll specify a value for the `--bootnodes` option that will connect Bob's node to Alice's Bootnode ID on TCP port 30333:

[source, shell]
cargo run --release \-- \
Expand Down
4 changes: 2 additions & 2 deletions frame/contracts/src/exec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2056,9 +2056,9 @@ mod tests {
#[test]
fn code_hash_returns_proper_values() {
let code_bob = MockLoader::insert(Call, |ctx, _| {
// ALICE is not a contract and hence she does not have a code_hash
// ALICE is not a contract and hence they do not have a code_hash
assert!(ctx.ext.code_hash(&ALICE).is_none());
// BOB is a contract and hence he has a code_hash
// BOB is a contract and hence it has a code_hash
assert!(ctx.ext.code_hash(&BOB).is_some());
exec_success()
});
Expand Down
2 changes: 1 addition & 1 deletion frame/elections-phragmen/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const BALANCE_FACTOR: u32 = 250;
/// grab new account with infinite balance.
fn endowed_account<T: Config>(name: &'static str, index: u32) -> T::AccountId {
let account: T::AccountId = account(name, index, 0);
// Fund each account with at-least his stake but still a sane amount as to not mess up
// Fund each account with at-least their stake but still a sane amount as to not mess up
// the vote calculation.
let amount = default_stake::<T>(T::MaxVoters::get()) * BalanceOf::<T>::from(BALANCE_FACTOR);
let _ = T::Currency::make_free_balance_be(&account, amount);
Expand Down
2 changes: 1 addition & 1 deletion frame/nfts/src/features/transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
details.owner = dest;

// The approved accounts have to be reset to None, because otherwise pre-approve attack
// would be possible, where the owner can approve his second account before making the
// would be possible, where the owner can approve their second account before making the
// transaction and then claiming the item back.
details.approvals.clear();

Expand Down
2 changes: 1 addition & 1 deletion frame/nomination-pools/src/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pub mod v1 {

/// Trivial migration which makes the roles of each pool optional.
///
/// Note: The depositor is not optional since he can never change.
/// Note: The depositor is not optional since they can never change.
pub struct MigrateToV1<T>(sp_std::marker::PhantomData<T>);
impl<T: Config> OnRuntimeUpgrade for MigrateToV1<T> {
fn on_runtime_upgrade() -> Weight {
Expand Down
2 changes: 1 addition & 1 deletion frame/nomination-pools/test-staking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ fn pool_slash_proportional() {

#[test]
fn pool_slash_non_proportional_only_bonded_pool() {
// A typical example where a pool member unbonds in era 99, and he can get away with a slash
// A typical example where a pool member unbonds in era 99, and they can get away with a slash
// that happened in era 100, as long as the pool has enough active bond to cover the slash. If
// everything else in the slashing/staking system works, this should always be the case.
// Nonetheless, `ledger.slash` has been written such that it will slash greedily from any chunk
Expand Down
4 changes: 2 additions & 2 deletions frame/root-offences/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fn create_offence_works_given_root_origin() {
// the slash should be applied right away.
assert_eq!(Balances::free_balance(11), 500);

// the other validator should keep his balance, because we only created
// the other validator should keep their balance, because we only created
// an offences for the first validator.
assert_eq!(Balances::free_balance(21), 1000);
})
Expand All @@ -68,7 +68,7 @@ fn create_offence_wont_slash_non_active_validators() {
// so 31 didn't get slashed.
assert_eq!(Balances::free_balance(31), 500);

// but 11 is an active validator so he got slashed.
// but 11 is an active validator so they got slashed.
assert_eq!(Balances::free_balance(11), 800);
})
}
Expand Down
2 changes: 1 addition & 1 deletion frame/staking/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1901,7 +1901,7 @@ fn wrong_vote_is_moot() {
#[test]
fn bond_with_no_staked_value() {
// Behavior when someone bonds with no staked value.
// Particularly when she votes and the candidate is elected.
// Particularly when they votes and the candidate is elected.
ExtBuilder::default()
.validator_count(3)
.existential_deposit(5)
Expand Down
4 changes: 2 additions & 2 deletions frame/uniques/src/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
details.owner = dest;

// The approved account has to be reset to None, because otherwise pre-approve attack would
// be possible, where the owner can approve his second account before making the transaction
// and then claiming the item back.
// be possible, where the owner can approve their second account before making the
// transaction and then claiming the item back.
details.approved = None;

Item::<T, I>::insert(&collection, &item, &details);
Expand Down

0 comments on commit 248fdf0

Please sign in to comment.