mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 19:47:59 +00:00
Sensible scheduling for referenda (#2753)
* Nonlinear locking and cleanups * Bump runtime version * Minor cleanup * Fix tests * Fix council tests * Fix flaw in turnout counting * Initial work on referendum schedules * Refactor council-democracy interface. * Fix build * Update srml/democracy/src/lib.rs Co-Authored-By: Luke Schoen <ltfschoen@users.noreply.github.com> * Update srml/democracy/src/lib.rs Co-Authored-By: Luke Schoen <ltfschoen@users.noreply.github.com> * Tests compile again * Tests! * Update todo * Fix build * Ensure votes arer not double-counted on member-transitions * Extra logic for normal council changes * Typo * A few grumbles addressed.
This commit is contained in:
@@ -73,7 +73,11 @@ pub trait EnsureOrigin<OuterOrigin> {
|
||||
/// A return type.
|
||||
type Success;
|
||||
/// Perform the origin check.
|
||||
fn ensure_origin(o: OuterOrigin) -> result::Result<Self::Success, &'static str>;
|
||||
fn ensure_origin(o: OuterOrigin) -> result::Result<Self::Success, &'static str> {
|
||||
Self::try_origin(o).map_err(|_| "Invalid origin")
|
||||
}
|
||||
/// Perform the origin check.
|
||||
fn try_origin(o: OuterOrigin) -> result::Result<Self::Success, OuterOrigin>;
|
||||
}
|
||||
|
||||
/// Means of changing one type into another in a manner dependent on the source type.
|
||||
|
||||
Reference in New Issue
Block a user