Skip to content
Snippets Groups Projects
Commit 8f7971dc authored by Ankan's avatar Ankan Committed by GitHub
Browse files

add note on usage of twox hash (#13089)

parent d72f6176
Branches
No related merge requests found
......@@ -147,6 +147,8 @@ pub mod pallet {
/// The map of all accounts wishing to be unstaked.
///
/// Keeps track of `AccountId` wishing to unstake and it's corresponding deposit.
///
/// TWOX-NOTE: SAFE since `AccountId` is a secure hash.
#[pallet::storage]
pub type Queue<T: Config> = CountedStorageMap<_, Twox64Concat, T::AccountId, BalanceOf<T>>;
......
......@@ -1277,6 +1277,8 @@ pub mod pallet {
pub type MaxPoolMembersPerPool<T: Config> = StorageValue<_, u32, OptionQuery>;
/// Active members.
///
/// TWOX-NOTE: SAFE since `AccountId` is a secure hash.
#[pallet::storage]
pub type PoolMembers<T: Config> =
CountedStorageMap<_, Twox64Concat, T::AccountId, PoolMember<T>>;
......
......@@ -292,6 +292,8 @@ pub mod pallet {
pub type Invulnerables<T: Config> = StorageValue<_, Vec<T::AccountId>, ValueQuery>;
/// Map from all locked "stash" accounts to the controller account.
///
/// TWOX-NOTE: SAFE since `AccountId` is a secure hash.
#[pallet::storage]
#[pallet::getter(fn bonded)]
pub type Bonded<T: Config> = StorageMap<_, Twox64Concat, T::AccountId, T::AccountId>;
......@@ -320,12 +322,16 @@ pub mod pallet {
pub type Ledger<T: Config> = StorageMap<_, Blake2_128Concat, T::AccountId, StakingLedger<T>>;
/// Where the reward payment should be made. Keyed by stash.
///
/// TWOX-NOTE: SAFE since `AccountId` is a secure hash.
#[pallet::storage]
#[pallet::getter(fn payee)]
pub type Payee<T: Config> =
StorageMap<_, Twox64Concat, T::AccountId, RewardDestination<T::AccountId>, ValueQuery>;
/// The map from (wannabe) validator stash key to the preferences of that validator.
///
/// TWOX-NOTE: SAFE since `AccountId` is a secure hash.
#[pallet::storage]
#[pallet::getter(fn validators)]
pub type Validators<T: Config> =
......@@ -353,6 +359,8 @@ pub mod pallet {
///
/// Lastly, if any of the nominators become non-decodable, they can be chilled immediately via
/// [`Call::chill_other`] dispatchable by anyone.
///
/// TWOX-NOTE: SAFE since `AccountId` is a secure hash.
#[pallet::storage]
#[pallet::getter(fn nominators)]
pub type Nominators<T: Config> =
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment