Use non-binary pronouns in comments. (#13209)

* use non binary pronouns in comments

* cargo fmt

* fix the use of "it" with "they" when dealing about an opperations identity
This commit is contained in:
Dan Henton
2023-01-28 00:31:17 +13:00
committed by GitHub
parent 1b27ae9549
commit ae8ef86ec0
12 changed files with 19 additions and 18 deletions
+1 -1
View File
@@ -255,7 +255,7 @@ Secret Key URI `0x8c9a73097f235b84021a446bc2826a00c690ea0be3e0d81a84931cb4146d66
SS58 Address: 1bobYxBPjZWRPbVo35aSwci1u5Zmq8P6J2jpa4kkudBZMqE 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. **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.
+4 -3
View File
@@ -151,7 +151,7 @@ impl BeefyTestNet {
) -> Vec<H256> { ) -> Vec<H256> {
let mut all_hashes = Vec::with_capacity(count + 1); 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 // of hashes, otherwise indexing would be broken
assert!(self.peer(0).client().as_backend().blockchain().hash(1).unwrap().is_none()); assert!(self.peer(0).client().as_backend().blockchain().hash(1).unwrap().is_none());
@@ -926,7 +926,8 @@ async fn on_demand_beefy_justification_sync() {
) )
.await; .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); tokio::spawn(dave_task);
// give Dave a chance to spawn and init. // give Dave a chance to spawn and init.
run_for(Duration::from_millis(400), &net).await; run_for(Duration::from_millis(400), &net).await;
@@ -937,7 +938,7 @@ async fn on_demand_beefy_justification_sync() {
client.finalize_block(hashes[1], None).unwrap(); client.finalize_block(hashes[1], None).unwrap();
// Give Dave task some cpu cycles to process the finality notification, // Give Dave task some cpu cycles to process the finality notification,
run_for(Duration::from_millis(100), &net).await; 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. // 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; finalize_block_and_wait_for_beefy(&net, fast_peers, &[hashes[25]], &[25]).await;
+1 -1
View File
@@ -1494,7 +1494,7 @@ where
// this way we can revert it if there's any error // this way we can revert it if there's any error
let mut old_epoch_changes = None; 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... // mutex, even if we dropped it...
let mut epoch_changes = { let mut epoch_changes = {
let mut epoch_changes = self.epoch_changes.shared_data_locked(); let mut epoch_changes = self.epoch_changes.shared_data_locked();
+2 -2
View File
@@ -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. 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] [source, shell]
cargo run --release \-- \ cargo run --release \-- \
@@ -308,7 +308,7 @@ cargo run --release \-- \
--telemetry-url 'ws://telemetry.polkadot.io:1024 0' \ --telemetry-url 'ws://telemetry.polkadot.io:1024 0' \
--validator --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] [source, shell]
cargo run --release \-- \ cargo run --release \-- \
+2 -2
View File
@@ -2056,9 +2056,9 @@ mod tests {
#[test] #[test]
fn code_hash_returns_proper_values() { fn code_hash_returns_proper_values() {
let code_bob = MockLoader::insert(Call, |ctx, _| { 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()); 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()); assert!(ctx.ext.code_hash(&BOB).is_some());
exec_success() exec_success()
}); });
@@ -32,7 +32,7 @@ const BALANCE_FACTOR: u32 = 250;
/// grab new account with infinite balance. /// grab new account with infinite balance.
fn endowed_account<T: Config>(name: &'static str, index: u32) -> T::AccountId { fn endowed_account<T: Config>(name: &'static str, index: u32) -> T::AccountId {
let account: T::AccountId = account(name, index, 0); 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. // the vote calculation.
let amount = default_stake::<T>(T::MaxVoters::get()) * BalanceOf::<T>::from(BALANCE_FACTOR); let amount = default_stake::<T>(T::MaxVoters::get()) * BalanceOf::<T>::from(BALANCE_FACTOR);
let _ = T::Currency::make_free_balance_be(&account, amount); let _ = T::Currency::make_free_balance_be(&account, amount);
@@ -64,7 +64,7 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
details.owner = dest; details.owner = dest;
// The approved accounts have to be reset to None, because otherwise pre-approve attack // 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. // transaction and then claiming the item back.
details.approvals.clear(); details.approvals.clear();
@@ -63,7 +63,7 @@ pub mod v1 {
/// Trivial migration which makes the roles of each pool optional. /// 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>); pub struct MigrateToV1<T>(sp_std::marker::PhantomData<T>);
impl<T: Config> OnRuntimeUpgrade for MigrateToV1<T> { impl<T: Config> OnRuntimeUpgrade for MigrateToV1<T> {
fn on_runtime_upgrade() -> Weight { fn on_runtime_upgrade() -> Weight {
@@ -531,7 +531,7 @@ fn pool_slash_proportional() {
#[test] #[test]
fn pool_slash_non_proportional_only_bonded_pool() { 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 // 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. // 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 // Nonetheless, `ledger.slash` has been written such that it will slash greedily from any chunk
+2 -2
View File
@@ -44,7 +44,7 @@ fn create_offence_works_given_root_origin() {
// the slash should be applied right away. // the slash should be applied right away.
assert_eq!(Balances::free_balance(11), 500); 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. // an offences for the first validator.
assert_eq!(Balances::free_balance(21), 1000); assert_eq!(Balances::free_balance(21), 1000);
}) })
@@ -68,7 +68,7 @@ fn create_offence_wont_slash_non_active_validators() {
// so 31 didn't get slashed. // so 31 didn't get slashed.
assert_eq!(Balances::free_balance(31), 500); 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); assert_eq!(Balances::free_balance(11), 800);
}) })
} }
+1 -1
View File
@@ -1901,7 +1901,7 @@ fn wrong_vote_is_moot() {
#[test] #[test]
fn bond_with_no_staked_value() { fn bond_with_no_staked_value() {
// Behavior when someone bonds 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() ExtBuilder::default()
.validator_count(3) .validator_count(3)
.existential_deposit(5) .existential_deposit(5)
+2 -2
View File
@@ -50,8 +50,8 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
details.owner = dest; details.owner = dest;
// The approved account has to be reset to None, because otherwise pre-approve attack would // 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 // be possible, where the owner can approve their second account before making the
// and then claiming the item back. // transaction and then claiming the item back.
details.approved = None; details.approved = None;
Item::<T, I>::insert(&collection, &item, &details); Item::<T, I>::insert(&collection, &item, &details);