mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 17:31:05 +00:00
Add notes about safe uses of twox (#6082)
* Add notes about safe uses of twox * Update frame/grandpa/src/lib.rs Co-authored-by: Nikolay Volf <nikvolf@gmail.com> * Update frame/elections/src/lib.rs * Apply suggestions from code review Co-authored-by: Gavin Wood <gavin@parity.io> Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
This commit is contained in:
@@ -389,6 +389,8 @@ pub struct RegistrarInfo<
|
||||
decl_storage! {
|
||||
trait Store for Module<T: Trait> as Identity {
|
||||
/// Information that is pertinent to identify the entity behind an account.
|
||||
///
|
||||
/// TWOX-NOTE: OK ― `AccountId` is a secure hash.
|
||||
pub IdentityOf get(fn identity):
|
||||
map hasher(twox_64_concat) T::AccountId => Option<Registration<BalanceOf<T>>>;
|
||||
|
||||
@@ -400,6 +402,8 @@ decl_storage! {
|
||||
/// Alternative "sub" identities of this account.
|
||||
///
|
||||
/// The first item is the deposit, the second is a vector of the accounts.
|
||||
///
|
||||
/// TWOX-NOTE: OK ― `AccountId` is a secure hash.
|
||||
pub SubsOf get(fn subs_of):
|
||||
map hasher(twox_64_concat) T::AccountId => (BalanceOf<T>, Vec<T::AccountId>);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user