mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 10:31:04 +00:00
Refactor away from opaque hashes (#5226)
* System.BlockHash * Fix hash * Introduce K/V iteration in all _concat maps Also move across: - System.Account (blake2_128_concat) - Balances.Locks (twox_64_concat) - ElectionsPhragmen.VotesOf (twox_64_concat) - ElectionsPhragmen.StakeOf (twox_64_concat) - Identity.IdentityOf (twox_64_concat) - Identity.SubsOf (twox_64_concat) - Society.Payouts (twox_64_concat) - Session.NextKeys (twox_64_concat) - Identity.SuperOf (blake2_128_concat) - Session.KeyOwner (blake2_128_concat) - Society.SuspendedCandidates (twox_64_concat) - Society.SuspendedMembers (twox_64_concat) - Society.Vouching (twox_64_concat) - Society.Strikes (twox_64_concat) - System.EventTopics - Balances.Account * Build fixes * Ensure migration happens in correct order * Staking.* * Vesting.* Offences.* * Democracy.* * Babe.* Collective.* * Grandpa.* * Assets.* Benchmark.* Contracts.* Elections.* Asset.* Nicks.* Also introduce real account list * ImOnline.* * Treasury.* * Recovery.* * Final bits. * Docs * Fix one test * Fix test * All passing except the UI tests * Remove linked_map part 1 * Remove linked_map * Some iterator utils for double maps. * Remove old migrations * Introduce tombstone for LinkedMap type * Migration for genesis hash * Fix build * Fix hash * Rename Map is_linked -> unused, keeping backwards compat (#5256) * Update frame/balances/src/lib.rs Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com> * Update frame/elections/src/lib.rs Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com> * Remove old migration code. * Update frame/system/src/lib.rs Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com> * Update bin/node/runtime/src/lib.rs Co-Authored-By: Shawn Tabrizi <shawntabrizi@gmail.com> * Fix hash * fix session migration * Fix watning Co-authored-by: Jaco Greeff <jacogr@gmail.com> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
This commit is contained in:
@@ -236,16 +236,16 @@ decl_storage! {
|
||||
// [`all_approvals_of`]. Furthermore, each vector of scalars is chunked with the cap of
|
||||
// `APPROVAL_SET_SIZE`.
|
||||
pub ApprovalsOf get(fn approvals_of):
|
||||
map hasher(blake2_256) (T::AccountId, SetIndex) => Vec<ApprovalFlag>;
|
||||
map hasher(twox_64_concat) (T::AccountId, SetIndex) => Vec<ApprovalFlag>;
|
||||
/// The vote index and list slot that the candidate `who` was registered or `None` if they
|
||||
/// are not currently registered.
|
||||
pub RegisterInfoOf get(fn candidate_reg_info):
|
||||
map hasher(blake2_256) T::AccountId => Option<(VoteIndex, u32)>;
|
||||
map hasher(twox_64_concat) T::AccountId => Option<(VoteIndex, u32)>;
|
||||
/// Basic information about a voter.
|
||||
pub VoterInfoOf get(fn voter_info):
|
||||
map hasher(blake2_256) T::AccountId => Option<VoterInfo<BalanceOf<T>>>;
|
||||
map hasher(twox_64_concat) T::AccountId => Option<VoterInfo<BalanceOf<T>>>;
|
||||
/// The present voter list (chunked and capped at [`VOTER_SET_SIZE`]).
|
||||
pub Voters get(fn voters): map hasher(blake2_256) SetIndex => Vec<Option<T::AccountId>>;
|
||||
pub Voters get(fn voters): map hasher(twox_64_concat) SetIndex => Vec<Option<T::AccountId>>;
|
||||
/// the next free set to store a voter in. This will keep growing.
|
||||
pub NextVoterSet get(fn next_nonfull_voter_set): SetIndex = 0;
|
||||
/// Current number of Voters.
|
||||
@@ -266,7 +266,7 @@ decl_storage! {
|
||||
|
||||
/// Who is able to vote for whom. Value is the fund-holding account, key is the
|
||||
/// vote-transaction-sending account.
|
||||
pub Proxy get(fn proxy): map hasher(blake2_256) T::AccountId => Option<T::AccountId>;
|
||||
pub Proxy get(fn proxy): map hasher(blake2_128_concat) T::AccountId => Option<T::AccountId>;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ impl frame_system::Trait for Test {
|
||||
type Version = ();
|
||||
type ModuleToIndex = ();
|
||||
type AccountData = pallet_balances::AccountData<u64>;
|
||||
type OnNewAccount = ();
|
||||
type MigrateAccount = (); type OnNewAccount = ();
|
||||
type OnKilledAccount = ();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user