Grandpa: Store the authority set changes (#2336) (#2337)

* Grandpa: Store the authority set changes
This commit is contained in:
Serban Iorga
2023-08-08 15:27:07 +03:00
committed by Bastian Köcher
parent f42b883745
commit bccd6e893e
17 changed files with 128 additions and 69 deletions
+4 -4
View File
@@ -295,8 +295,8 @@ macro_rules! decl_bridge_finality_runtime_apis {
$(
/// Name of the `<ThisChain>FinalityApi::accepted_<consensus>_finality_proofs`
/// runtime method.
pub const [<$chain:upper _ACCEPTED_ $consensus:upper _FINALITY_PROOFS_METHOD>]: &str =
stringify!([<$chain:camel FinalityApi_accepted_ $consensus:lower _finality_proofs>]);
pub const [<$chain:upper _SYNCED_HEADERS_ $consensus:upper _INFO_METHOD>]: &str =
stringify!([<$chain:camel FinalityApi_synced_headers_ $consensus:lower _info>]);
)?
sp_api::decl_runtime_apis! {
@@ -310,7 +310,7 @@ macro_rules! decl_bridge_finality_runtime_apis {
$(
/// Returns the justifications accepted in the current block.
fn [<accepted_ $consensus:lower _finality_proofs>](
fn [<synced_headers_ $consensus:lower _info>](
) -> Vec<$justification_type>;
)?
}
@@ -321,7 +321,7 @@ macro_rules! decl_bridge_finality_runtime_apis {
}
};
($chain: ident, grandpa) => {
decl_bridge_finality_runtime_apis!($chain, grandpa => bp_header_chain::justification::GrandpaJustification<Header>);
decl_bridge_finality_runtime_apis!($chain, grandpa => bp_header_chain::HeaderGrandpaInfo<Header>);
};
}