mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-14 00:25:51 +00:00
Introduce scheduler and use it for the democracy dispatch queue (#5412)
* Initial draft of the logic * Build and tests * Make work with new initialize infratructure. * Update frame/scheduler/src/lib.rs Co-Authored-By: Marcio Diaz <marcio.diaz@gmail.com> * Update frame/scheduler/src/lib.rs Co-Authored-By: Marcio Diaz <marcio.diaz@gmail.com> * Update frame/scheduler/src/lib.rs Co-Authored-By: Marcio Diaz <marcio.diaz@gmail.com> * Update frame/scheduler/src/lib.rs Co-Authored-By: Marcio Diaz <marcio.diaz@gmail.com> * Fix test * Update frame/scheduler/src/lib.rs Co-Authored-By: Marcio Diaz <marcio.diaz@gmail.com> * Rejig interface to make it more useful for democracy. * Try to get democraxy module to make use of scheduler. * Make democracy use scheduler. * Use actual max weight for enactent * Remove TODO * Fix runtime build * Minor cleanup * Fix scheduler. * Fix benchmarks * Fix * Fix * Fix * More bench fixes * Fix * Fix. * Add more bench constants. * Fix cancel_queued bench. * Fix test comment. * Update frame/scheduler/src/lib.rs Co-Authored-By: Marcio Diaz <marcio.diaz@gmail.com> Co-authored-by: Marcio Diaz <marcio.diaz@gmail.com>
This commit is contained in:
@@ -85,9 +85,7 @@ fn single_proposal_should_work() {
|
||||
fast_forward_to(4);
|
||||
|
||||
assert!(Democracy::referendum_status(0).is_err());
|
||||
assert_eq!(Democracy::dispatch_queue(), vec![
|
||||
(6, set_balance_proposal_hash_and_note(2), 0)
|
||||
]);
|
||||
assert!(pallet_scheduler::Agenda::<Test>::get(6)[0].is_some());
|
||||
|
||||
// referendum passes and wait another two blocks for enactment.
|
||||
fast_forward_to(6);
|
||||
|
||||
Reference in New Issue
Block a user