Polkadot companion for Substrate PR #7640 (Store multiple Justifications per block) (#2358)

* service: update for substrate PR #7640

* update substrate

* Add Pallet Babe to Integration Tests Runtime

Co-authored-by: André Silva <andrerfosilva@gmail.com>
Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
Jon Häggblad
2021-03-18 00:12:29 +01:00
committed by GitHub
parent cd2b745b28
commit 5e8c8c7676
3 changed files with 153 additions and 152 deletions
+145 -145
View File
File diff suppressed because it is too large Load Diff
+7 -7
View File
@@ -20,7 +20,7 @@ use std::sync::Arc;
use sp_api::{ProvideRuntimeApi, CallApiAt, NumberFor}; use sp_api::{ProvideRuntimeApi, CallApiAt, NumberFor};
use sp_blockchain::HeaderBackend; use sp_blockchain::HeaderBackend;
use sp_runtime::{ use sp_runtime::{
Justification, generic::{BlockId, SignedBlock}, traits::{Block as BlockT, BlakeTwo256}, Justifications, generic::{BlockId, SignedBlock}, traits::{Block as BlockT, BlakeTwo256},
}; };
use sc_client_api::{Backend as BackendT, BlockchainEvents, KeyIterator}; use sc_client_api::{Backend as BackendT, BlockchainEvents, KeyIterator};
use sp_storage::{StorageData, StorageKey, ChildInfo, PrefixedStorageKey}; use sp_storage::{StorageData, StorageKey, ChildInfo, PrefixedStorageKey};
@@ -204,15 +204,15 @@ impl sc_client_api::BlockBackend<Block> for Client {
} }
} }
fn justification( fn justifications(
&self, &self,
id: &BlockId<Block> id: &BlockId<Block>
) -> sp_blockchain::Result<Option<Justification>> { ) -> sp_blockchain::Result<Option<Justifications>> {
match self { match self {
Self::Polkadot(client) => client.justification(id), Self::Polkadot(client) => client.justifications(id),
Self::Westend(client) => client.justification(id), Self::Westend(client) => client.justifications(id),
Self::Kusama(client) => client.justification(id), Self::Kusama(client) => client.justifications(id),
Self::Rococo(client) => client.justification(id), Self::Rococo(client) => client.justifications(id),
} }
} }
@@ -61,6 +61,7 @@ frame_support::construct_runtime!(
// System Stuff // System Stuff
System: frame_system::{Module, Call, Config, Storage, Event<T>}, System: frame_system::{Module, Call, Config, Storage, Event<T>},
Balances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>}, Balances: pallet_balances::{Module, Call, Storage, Config<T>, Event<T>},
Babe: pallet_babe::{Module, Call, Storage, Config, ValidateUnsigned},
// Parachains Runtime // Parachains Runtime
Configuration: configuration::{Module, Call, Storage, Config<T>}, Configuration: configuration::{Module, Call, Storage, Config<T>},