mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 11:41:04 +00:00
Refactor the balances module (#4649)
* Initially scoping out of the problem * Remove need for exiry in balance locks. * Remove expiry from locks. * Remove supefluous balance test * Amalgamate pieces of balance module * Split out vesting * Fix tests * Fixes for vesting. * Docs. * Weight docs. * Refactor things in terms of set_balances. * Switch out ED to be free + reserved. * Remove on_free_balance_zero and some docs. * Build fixes * Update frame/vesting/src/lib.rs Co-Authored-By: Xiliang Chen <xlchen1291@gmail.com> * Update frame/vesting/src/lib.rs Co-Authored-By: Xiliang Chen <xlchen1291@gmail.com> * Migration * Remove superfluous code. * Test fixes * Fix some tests * Fix repatriate reserve * Fixes * Add test for migration * Final cleanups * Fix * Indentation. * Undo unneeded referencing * Bump runtime version * Fixes Co-authored-by: Xiliang Chen <xlchen1291@gmail.com>
This commit is contained in:
@@ -1179,14 +1179,14 @@ fn election_present_when_presenter_is_poor_should_not_work() {
|
||||
|
||||
// -3
|
||||
assert_ok!(Elections::submit_candidacy(Origin::signed(1), 0));
|
||||
assert_eq!(Balances::free_balance(&1), 12);
|
||||
assert_eq!(Balances::free_balance(1), 12);
|
||||
// -2 -5
|
||||
assert_ok!(Elections::set_approvals(Origin::signed(1), vec![true], 0, 0, 15));
|
||||
assert_ok!(Elections::end_block(System::block_number()));
|
||||
|
||||
System::set_block_number(6);
|
||||
assert_eq!(Balances::free_balance(&1), 5);
|
||||
assert_eq!(Balances::reserved_balance(&1), 5);
|
||||
assert_eq!(Balances::free_balance(1), 5);
|
||||
assert_eq!(Balances::reserved_balance(1), 5);
|
||||
if p > 5 {
|
||||
assert_noop!(Elections::present_winner(
|
||||
Origin::signed(1), 1, 10, 0),
|
||||
|
||||
Reference in New Issue
Block a user