Skip to content

Commit

Permalink
migration(elections-phragmen): unreserve deposits and clear locks (pa…
Browse files Browse the repository at this point in the history
…ritytech#14218)

* pre_upgrade hook wip

* working pre_upgrade

* simplify code

* cleanup and document

* return reads from get_account_deposited_and_staked_sums

* improve comment

* on_runtime_upgrade comment

* post upgrade comment

* use saturating_add

* clippy

* clean up balances

* add tests

* fix comment

* oops

* actually fix comment

* fix std build

* address pr comments

* remove redundant comment

* update comment

* add comment

* oliver comments from tips pallet pr

* lint

* remove need for do_pre/do_post runtime functions

* generic dbweight

* Update frame/elections-phragmen/src/migrations/unlock_and_unreserve_all_funds.rs

Co-authored-by: Oliver Tale-Yazdi <[email protected]>

* Update frame/elections-phragmen/src/migrations/unlock_and_unreserve_all_funds.rs

Co-authored-by: Oliver Tale-Yazdi <[email protected]>

* pr comments

* remove useless check

* feature gate log target

* lint

* Update frame/elections-phragmen/src/migrations/unlock_and_unreserve_all_funds.rs

Co-authored-by: Oliver Tale-Yazdi <[email protected]>

* add log for unexpected amounts

---------

Co-authored-by: Oliver Tale-Yazdi <[email protected]>
  • Loading branch information
2 people authored and nathanwhit committed Jul 19, 2023
1 parent 2be7bb4 commit 48c5b53
Show file tree
Hide file tree
Showing 2 changed files with 438 additions and 0 deletions.
2 changes: 2 additions & 0 deletions frame/elections-phragmen/src/migrations/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

//! All migrations of this pallet.

/// Migration to unreserve all pallet funds.
pub mod unlock_and_unreserve_all_funds;
/// Version 3.
pub mod v3;
/// Version 4.
Expand Down
Loading

0 comments on commit 48c5b53

Please sign in to comment.