mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-11 11:51:12 +00:00
Fix doc propagation for Call enum (#2690)
* Fix doc propagation for `Call` enum * Fix warnings while generating `srml-staking` docs * Make the line check happy
This commit is contained in:
@@ -187,15 +187,16 @@
|
||||
//! A validator can be _reported_ to be offline at any point via the public function
|
||||
//! [`on_offline_validator`](enum.Call.html#variant.on_offline_validator). Each validator declares how many times it
|
||||
//! can be _reported_ before it actually gets slashed via its
|
||||
//! [`unstake_threshold`](./struct.ValidatorPrefs.html#structfield.unstake_threshold).
|
||||
//! [`ValidatorPrefs::unstake_threshold`](./struct.ValidatorPrefs.html#structfield.unstake_threshold).
|
||||
//!
|
||||
//! On top of this, the Staking module also introduces an
|
||||
//! [`OfflineSlashGrace`](./struct.Module.html#method.offline_slash_grace), which applies
|
||||
//! to all validators and prevents them from getting immediately slashed.
|
||||
//!
|
||||
//! Essentially, a validator gets slashed once they have been reported more than
|
||||
//! [`OfflineSlashGrace`] + [`unstake_threshold`] times. Getting slashed due to offline report always leads
|
||||
//! to being _unstaked_ (_i.e._ removed as a validator candidate) as the consequence.
|
||||
//! [`OfflineSlashGrace`] + [`ValidatorPrefs::unstake_threshold`] times. Getting slashed due to
|
||||
//! offline report always leads to being _unstaked_ (_i.e._ removed as a validator candidate) as
|
||||
//! the consequence.
|
||||
//!
|
||||
//! The base slash value is computed _per slash-event_ by multiplying
|
||||
//! [`OfflineSlash`](./struct.Module.html#method.offline_slash) and the `total` `Exposure`. This value is then
|
||||
|
||||
@@ -773,6 +773,7 @@ macro_rules! decl_module {
|
||||
$type,
|
||||
}
|
||||
variant $fn_name;
|
||||
$( #[doc = $doc_attr] )*
|
||||
$( $rest )*
|
||||
}
|
||||
};
|
||||
@@ -800,6 +801,7 @@ macro_rules! decl_module {
|
||||
$type,
|
||||
}
|
||||
variant $fn_name;
|
||||
$( #[doc = $doc_attr] )*
|
||||
$( $rest )*
|
||||
}
|
||||
};
|
||||
@@ -859,7 +861,10 @@ macro_rules! decl_module {
|
||||
|
||||
(@imp
|
||||
$(#[$attr:meta])*
|
||||
pub struct $mod_type:ident<$trait_instance:ident: $trait_name:ident$(<I>, $instance:ident: $instantiable:path $(= $module_default_instance:path)?)?>
|
||||
pub struct $mod_type:ident<
|
||||
$trait_instance:ident: $trait_name:ident
|
||||
$(<I>, $instance:ident: $instantiable:path $(= $module_default_instance:path)?)?
|
||||
>
|
||||
for enum $call_type:ident where origin: $origin_type:ty, system = $system:ident {
|
||||
$(
|
||||
$(#[doc = $doc_attr:tt])*
|
||||
@@ -881,7 +886,10 @@ macro_rules! decl_module {
|
||||
// Workaround for https://github.com/rust-lang/rust/issues/26925 . Remove when sorted.
|
||||
#[derive(Clone, Copy, PartialEq, Eq)]
|
||||
#[cfg_attr(feature = "std", derive(Debug))]
|
||||
pub struct $mod_type<$trait_instance: $trait_name $(<I>, $instance: $instantiable $( = $module_default_instance)?)?>($crate::rstd::marker::PhantomData<($trait_instance $(, $instance)?)>);
|
||||
pub struct $mod_type<
|
||||
$trait_instance: $trait_name
|
||||
$(<I>, $instance: $instantiable $( = $module_default_instance)?)?
|
||||
>($crate::rstd::marker::PhantomData<($trait_instance $(, $instance)?)>);
|
||||
|
||||
$crate::decl_module! {
|
||||
@impl_on_initialize
|
||||
|
||||
Reference in New Issue
Block a user