From 0c61916351852789dc14ba2bdd440ffaf0c29d02 Mon Sep 17 00:00:00 2001 From: tuxmain <tuxmain@zettascript.org> Date: Mon, 6 Jun 2022 15:47:19 +0200 Subject: [PATCH] doc: typos --- pallets/duniter-wot/src/tests.rs | 26 ++++++++++++------------- pallets/identity/src/lib.rs | 24 +++++++++++------------ pallets/identity/src/tests.rs | 8 ++++---- pallets/universal-dividend/src/lib.rs | 2 +- runtime/common/src/lib.rs | 2 +- runtime/gdev/tests/integration_tests.rs | 8 ++++---- 6 files changed, 35 insertions(+), 35 deletions(-) diff --git a/pallets/duniter-wot/src/tests.rs b/pallets/duniter-wot/src/tests.rs index b32fc9ec8..2aab1f4c8 100644 --- a/pallets/duniter-wot/src/tests.rs +++ b/pallets/duniter-wot/src/tests.rs @@ -41,7 +41,7 @@ fn test_creator_not_allowed_to_create_idty() { new_test_ext(3, 2).execute_with(|| { run_to_block(1); - // Alice should not be able te create an identity before block #2 + // Alice should not be able to create an identity before block #2 // because Alice.next_issuable_on = 2 assert_err!( Identity::create_identity(Origin::signed(1), 4), @@ -55,7 +55,7 @@ fn test_join_smiths() { new_test_ext(5, 3).execute_with(|| { run_to_block(2); - // Dave shoud be able to requst smith membership + // Dave shoud be able to request smith membership assert_ok!(SmithsMembership::request_membership( Origin::signed(4), crate::MembershipMetaData(4) @@ -73,20 +73,20 @@ fn test_revoke_smiths_them_rejoin() { new_test_ext(5, 4).execute_with(|| { run_to_block(2); - // Dave shoud be able to revoke is smith membership + // Dave shoud be able to revoke his smith membership assert_ok!(SmithsMembership::revoke_membership( Origin::signed(4), Some(4) )); - // Dave should not be able te re-request membership before the RevocationPeriod end + // Dave should not be able to re-request membership before the RevocationPeriod end run_to_block(3); assert_err!( SmithsMembership::request_membership(Origin::signed(4), crate::MembershipMetaData(4)), pallet_membership::Error::<Test, crate::Instance2>::MembershipRevokedRecently ); - // At bloc #6, Dave shoud be able to request smith membership + // At block #6, Dave shoud be able to request smith membership run_to_block(6); assert_ok!(SmithsMembership::request_membership( Origin::signed(4), @@ -103,7 +103,7 @@ fn test_create_idty_ok() { new_test_ext(5, 2).execute_with(|| { run_to_block(2); - // Alice should be able te create an identity at block #2 + // Alice should be able to create an identity at block #2 assert_ok!(Identity::create_identity(Origin::signed(1), 6)); // 2 events should have occurred: IdtyCreated and NewCert let events = System::events(); @@ -140,11 +140,11 @@ fn test_create_idty_ok() { #[test] fn test_new_idty_validation() { new_test_ext(5, 2).execute_with(|| { - // Alice create Ferdie identity + // Alice creates Ferdie identity run_to_block(2); assert_ok!(Identity::create_identity(Origin::signed(1), 6)); - // Ferdie confirm it's identity + // Ferdie confirms his identity run_to_block(3); assert_ok!(Identity::confirm_identity( Origin::signed(6), @@ -207,12 +207,12 @@ fn test_confirm_idty_ok() { new_test_ext(5, 2).execute_with(|| { run_to_block(2); - // Alice create Ferdie identity + // Alice creates Ferdie identity assert_ok!(Identity::create_identity(Origin::signed(1), 6)); run_to_block(3); - // Ferdie should be able to confirm it's identity + // Ferdie should be able to confirm his identity assert_ok!(Identity::confirm_identity( Origin::signed(6), IdtyName::from("Ferdie"), @@ -249,9 +249,9 @@ fn test_idty_membership_expire_them_requested() { new_test_ext(3, 2).execute_with(|| { run_to_block(4); - // Alice renew her membership + // Alice renews her membership assert_ok!(Membership::renew_membership(Origin::signed(1), None)); - // Bob renew his membership + // Bob renews his membership assert_ok!(Membership::renew_membership(Origin::signed(2), None)); // Charlie's membership should expire at block #8 @@ -280,7 +280,7 @@ fn test_idty_membership_expire_them_requested() { // Charlie's identity should be removed at block #8 assert!(Identity::identity(3).is_none()); - // Alice can't renew it's cert to Charlie + // Alice can't renew her cert to Charlie assert_err!( Cert::add_cert(Origin::signed(1), 3), pallet_certification::Error::<Test, Instance1>::ReceiverNotFound diff --git a/pallets/identity/src/lib.rs b/pallets/identity/src/lib.rs index 833037d8c..87d607cb9 100644 --- a/pallets/identity/src/lib.rs +++ b/pallets/identity/src/lib.rs @@ -84,10 +84,10 @@ pub mod pallet { type IdtyValidationOrigin: EnsureOrigin<Self::Origin>; /// type IsMember: sp_runtime::traits::IsMember<Self::IdtyIndex>; - /// On identity confirmed by it's owner + /// On identity confirmed by its owner type OnIdtyChange: OnIdtyChange<Self>; - /// Handle the logic that remove all identity consumers. - /// "identity consumers" mean all things that rely on the existence of the identity. + /// Handle the logic that removes all identity consumers. + /// "identity consumers" meaning all things that rely on the existence of the identity. type RemoveIdentityConsumers: RemoveIdentityConsumers<Self::IdtyIndex>; /// Signing key of revocation payload type RevocationSigner: IdentifyAccount<AccountId = Self::AccountId>; @@ -207,7 +207,7 @@ pub mod pallet { idty_index: T::IdtyIndex, owner_key: T::AccountId, }, - /// An identity has been confirmed by it's owner + /// An identity has been confirmed by its owner /// [idty_index, owner_key, name] IdtyConfirmed { idty_index: T::IdtyIndex, @@ -476,15 +476,15 @@ pub mod pallet { IdtyCreationNotAllowed, /// Identity index not found IdtyIndexNotFound, - /// Identity name already exist + /// Identity name already exists IdtyNameAlreadyExist, - /// Idty name invalid + /// Invalid identity name IdtyNameInvalid, - /// Identity not confirmed by owner + /// Identity not confirmed by its owner IdtyNotConfirmedByOwner, /// Identity not found IdtyNotFound, - /// Idty not member + /// Identity not member IdtyNotMember, /// Identity not validated IdtyNotValidated, @@ -494,15 +494,15 @@ pub mod pallet { NotAllowedToConfirmIdty, /// Not allowed to validate identity NotAllowedToValidateIdty, - /// Not same identity name + /// Not the same identity name NotSameIdtyName, /// Right already added RightAlreadyAdded, - /// Right not exist + /// Right does not exist RightNotExist, - /// Not respect IdtyCreationPeriod + /// Identity creation period is not respected NotRespectIdtyCreationPeriod, - /// Owner account not exist + /// Owner account does not exist OwnerAccountNotExist, } diff --git a/pallets/identity/src/tests.rs b/pallets/identity/src/tests.rs index 3c4978e1c..d33b3001c 100644 --- a/pallets/identity/src/tests.rs +++ b/pallets/identity/src/tests.rs @@ -56,7 +56,7 @@ fn test_create_identity_ok() { // We need to initialize at least one block before any call run_to_block(1); - // Alice should be able te create an identity + // Alice should be able to create an identity assert_ok!(Identity::create_identity(Origin::signed(1), 2)); let events = System::events(); assert_eq!(events.len(), 1); @@ -83,7 +83,7 @@ fn test_create_identity_but_not_confirm_it() { // We need to initialize at least one block before any call run_to_block(1); - // Alice should be able te create an identity + // Alice should be able to create an identity assert_ok!(Identity::create_identity(Origin::signed(1), 2)); // The identity shoud expire in blocs #3 @@ -127,7 +127,7 @@ fn test_idty_creation_period() { // We need to initialize at least one block before any call run_to_block(1); - // Alice should be able te create an identity + // Alice should be able to create an identity assert_ok!(Identity::create_identity(Origin::signed(1), 2)); let events = System::events(); assert_eq!(events.len(), 1); @@ -151,7 +151,7 @@ fn test_idty_creation_period() { Err(Error::<Test>::NotRespectIdtyCreationPeriod.into()) ); - // Alice should be able te create a second identity after block #4 + // Alice should be able to create a second identity after block #4 run_to_block(4); assert_ok!(Identity::create_identity(Origin::signed(1), 3)); let events = System::events(); diff --git a/pallets/universal-dividend/src/lib.rs b/pallets/universal-dividend/src/lib.rs index a415df97a..9b57563bb 100644 --- a/pallets/universal-dividend/src/lib.rs +++ b/pallets/universal-dividend/src/lib.rs @@ -255,7 +255,7 @@ pub mod pallet { mut members_count: BalanceOf<T>, count_uds_beetween_two_reevals: BalanceOf<T>, // =(dt/udFrequency) ) -> BalanceOf<T> { - // Ensure that we not divide by zero + // Ensure that we do not divide by zero if members_count.is_zero() { members_count = One::one(); } diff --git a/runtime/common/src/lib.rs b/runtime/common/src/lib.rs index 3e4d998de..2763a8c2a 100644 --- a/runtime/common/src/lib.rs +++ b/runtime/common/src/lib.rs @@ -39,7 +39,7 @@ pub type Address = sp_runtime::MultiAddress<AccountId, ()>; /// Balance of an account. pub type Balance = u64; -/// Bock type. +/// Block type. pub type Block = sp_runtime::generic::Block<Header, UncheckedExtrinsic>; /// Block identifier type. diff --git a/runtime/gdev/tests/integration_tests.rs b/runtime/gdev/tests/integration_tests.rs index 6c339a71e..9f67f73a2 100644 --- a/runtime/gdev/tests/integration_tests.rs +++ b/runtime/gdev/tests/integration_tests.rs @@ -186,7 +186,7 @@ fn test_create_new_account_with_insufficient_balance() { }) ); - // At next bloc, the new account must be reaped because it's balance is not sufficient + // At next block, the new account must be reaped because its balance is not sufficient // to pay the "new account tax" run_to_block(3); let events = System::events(); @@ -251,8 +251,8 @@ fn test_create_new_account() { }) ); - // At next bloc, the new account must be created, - // and new account tax should be collected and deposited in the terasury + // At next block, the new account must be created, + // and new account tax should be collected and deposited in the treasury run_to_block(3); let events = System::events(); println!("{:#?}", events); @@ -338,7 +338,7 @@ fn test_create_new_idty() { AccountKeyring::Eve.to_account_id(), )); - // At next bloc, nothing should be preleved + // At next block, nothing should be preleved run_to_block(3); let events = System::events(); assert_eq!(events.len(), 0); -- GitLab