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
+9 -3
View File
@@ -17,12 +17,13 @@
//! Types used to connect to the Millau-Substrate chain.
use bp_messages::MessageNonce;
use bp_millau::MILLAU_ACCEPTED_GRANDPA_FINALITY_PROOFS_METHOD;
use bp_runtime::ChainId;
use codec::{Compact, Decode, Encode};
use relay_substrate_client::{
BalanceOf, Chain, ChainWithBalances, ChainWithMessages, ChainWithTransactions,
ChainWithUtilityPallet, Error as SubstrateError, FullRuntimeUtilityPallet, NonceOf, SignParam,
UnderlyingChainProvider, UnsignedTransaction,
BalanceOf, Chain, ChainWithBalances, ChainWithGrandpa, ChainWithMessages,
ChainWithTransactions, ChainWithUtilityPallet, Error as SubstrateError,
FullRuntimeUtilityPallet, NonceOf, SignParam, UnderlyingChainProvider, UnsignedTransaction,
};
use sp_core::{storage::StorageKey, Pair};
use sp_runtime::{generic::SignedPayload, traits::IdentifyAccount};
@@ -65,6 +66,11 @@ impl Chain for Millau {
type Call = millau_runtime::RuntimeCall;
}
impl ChainWithGrandpa for Millau {
const ACCEPTED_FINALITY_PROOFS_METHOD: &'static str =
MILLAU_ACCEPTED_GRANDPA_FINALITY_PROOFS_METHOD;
}
impl ChainWithBalances for Millau {
fn account_info_storage_key(account_id: &Self::AccountId) -> StorageKey {
use frame_support::storage::generator::StorageMap;