mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 07:27:55 +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:
@@ -112,12 +112,12 @@ macro_rules! impl_outer_origin {
|
||||
$name::system(x)
|
||||
}
|
||||
}
|
||||
impl Into<Option<$system::Origin<$runtime>>> for $name {
|
||||
fn into(self) -> Option<$system::Origin<$runtime>> {
|
||||
impl Into<$crate::rstd::result::Result<$system::Origin<$runtime>, $name>> for $name {
|
||||
fn into(self) -> $crate::rstd::result::Result<$system::Origin<$runtime>, Self> {
|
||||
if let $name::system(l) = self {
|
||||
Some(l)
|
||||
Ok(l)
|
||||
} else {
|
||||
None
|
||||
Err(self)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -132,12 +132,18 @@ macro_rules! impl_outer_origin {
|
||||
$name::$module(x)
|
||||
}
|
||||
}
|
||||
impl Into<Option<$module::Origin $( <$generic_param $(, $generic_instance )? > )*>> for $name {
|
||||
fn into(self) -> Option<$module::Origin $( <$generic_param $(, $generic_instance )? > )*> {
|
||||
impl Into<$crate::rstd::result::Result<
|
||||
$module::Origin $( <$generic_param $(, $generic_instance )? > )*,
|
||||
$name
|
||||
>> for $name {
|
||||
fn into(self) -> $crate::rstd::result::Result<
|
||||
$module::Origin $( <$generic_param $(, $generic_instance )? > )*,
|
||||
Self
|
||||
> {
|
||||
if let $name::$module(l) = self {
|
||||
Some(l)
|
||||
Ok(l)
|
||||
} else {
|
||||
None
|
||||
Err(self)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user