GRANDPA module: store accepted justifications (#2298) (#2301)

Store accepted justifications in events.
This commit is contained in:
Serban Iorga
2023-07-27 15:50:17 +03:00
committed by Bastian Köcher
parent 5f73a456c5
commit 7807b9de93
27 changed files with 193 additions and 63 deletions
+1
View File
@@ -13,6 +13,7 @@ scale-info = { version = "2.9.0", default-features = false, features = ["derive"
# Bridge dependencies
bp-header-chain = { path = "../../../primitives/header-chain", default-features = false }
bp-messages = { path = "../../../primitives/messages", default-features = false }
bp-millau = { path = "../../../primitives/chain-millau", default-features = false }
bp-parachains = { path = "../../../primitives/parachains", default-features = false }
+10
View File
@@ -882,12 +882,22 @@ impl_runtime_apis! {
fn best_finalized() -> Option<HeaderId<bp_rialto::Hash, bp_rialto::BlockNumber>> {
BridgeRialtoGrandpa::best_finalized()
}
fn accepted_grandpa_finality_proofs(
) -> Vec<bp_header_chain::justification::GrandpaJustification<bp_rialto::Header>> {
BridgeRialtoGrandpa::accepted_finality_proofs()
}
}
impl bp_westend::WestendFinalityApi<Block> for Runtime {
fn best_finalized() -> Option<HeaderId<bp_westend::Hash, bp_westend::BlockNumber>> {
BridgeWestendGrandpa::best_finalized()
}
fn accepted_grandpa_finality_proofs(
) -> Vec<bp_header_chain::justification::GrandpaJustification<bp_westend::Header>> {
BridgeWestendGrandpa::accepted_finality_proofs()
}
}
impl bp_westend::AssetHubWestendFinalityApi<Block> for Runtime {