Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
Merged
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
11d8158
impl notional_bag_for_works
emostov Jul 22, 2021
5f1c736
Merge remote-tracking branch 'origin' into zeke-prgn-nominator-unsort…
emostov Jul 23, 2021
25a16dc
Add tests: insert_as_works & insert_works
emostov Jul 23, 2021
9b55e10
Impl test: remove_works
emostov Jul 23, 2021
f3222d7
Trivial cleaning
emostov Jul 23, 2021
4a3f048
Merge branch 'prgn-nominator-unsorted-bags' into zeke-prgn-nominator-…
emostov Jul 23, 2021
a45e761
Add test: update_position_for_works
emostov Jul 23, 2021
fb4bbe3
Write out edge case; probably can delete later
emostov Jul 23, 2021
b9c9d56
Add test: bags::get_works
emostov Jul 23, 2021
1c41c1b
Add test: remove_node_happy_path_works
emostov Jul 24, 2021
e59b093
Add test: remove_node_bad_paths_documented
emostov Jul 24, 2021
83ec656
WIP: voting_data_works
emostov Jul 24, 2021
29af5c4
done
emostov Jul 24, 2021
2f82fb1
Improve test voting_data_works
emostov Jul 25, 2021
8c995f3
Add comment
emostov Jul 25, 2021
c847c23
Fill out test basic_setup_works
emostov Jul 26, 2021
d0bd4b5
Update: iteration_is_semi_sorted
emostov Jul 26, 2021
f1eb102
Improve remove_works
emostov Jul 26, 2021
0e4429f
Update update_position_for_works; create set_ledger_and_free_balance
emostov Jul 26, 2021
7a96f37
Improve get_works
emostov Jul 26, 2021
d8bdcd6
Improve storage clean up checks in remove test
emostov Jul 27, 2021
2522d75
Test: impl rebag_works + insert_and_remove_works
emostov Jul 27, 2021
de378b5
forgot file - Test: impl rebag_works + insert_and_remove_works
emostov Jul 27, 2021
e7fdad2
Small tweak
kianenigma Jul 27, 2021
724c17e
Update voter_bags test to reflect unused bags are removed
emostov Jul 27, 2021
8870351
Unbond & Rebond: do_rebag
emostov Jul 27, 2021
ec7b7cc
Prevent infinite loops with duplicate tail insert
emostov Jul 27, 2021
ad4247b
Merge branch 'prgn-nominator-unsorted-bags' into zeke-prgn-nominator-…
emostov Jul 27, 2021
b94fae3
Merge remote-tracking branch 'origin' into zeke-prgn-nominator-unsort…
emostov Jul 27, 2021
03c6b74
Merge branch 'prgn-nominator-unsorted-bags' into zeke-prgn-nominator-…
emostov Jul 27, 2021
d59ea90
Check iter.count on voter list in pre-migrate
emostov Jul 28, 2021
33cae7f
undo strang fmt comment stuff
emostov Jul 28, 2021
605640b
Add in todo
emostov Jul 28, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update: iteration_is_semi_sorted
  • Loading branch information
emostov committed Jul 26, 2021
commit d0bd4b5a8a0504a24c91627456c44f9539c7584d
14 changes: 14 additions & 0 deletions frame/staking/src/voter_bags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1041,6 +1041,20 @@ mod voter_list {
31, // last bag.
]
);

// when adding a voter that has a higher weight than pre-existing voters in the bag
bond_validator(71, 70, 10);

// then
assert_eq!(
iteration,
vec![
51, 61, // best bag
11, 21, 101, // middle bag
31, 71, // last bag; the new voter is last, because it is order of insertion
]
);

})
}

Expand Down