mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-11 17:41:08 +00:00
grandpa: Use storage proofs for Grandpa authorities (#3985)
This commit is contained in:
@@ -69,10 +69,11 @@ macro_rules! new_full_start {
|
||||
.with_import_queue(|_config, client, mut select_chain, _transaction_pool| {
|
||||
let select_chain = select_chain.take()
|
||||
.ok_or_else(|| substrate_service::Error::SelectChainRequired)?;
|
||||
let (grandpa_block_import, grandpa_link) =
|
||||
grandpa::block_import::<_, _, _, node_runtime::RuntimeApi, _, _>(
|
||||
client.clone(), &*client, select_chain
|
||||
)?;
|
||||
let (grandpa_block_import, grandpa_link) = grandpa::block_import(
|
||||
client.clone(),
|
||||
&*client,
|
||||
select_chain,
|
||||
)?;
|
||||
let justification_import = grandpa_block_import.clone();
|
||||
|
||||
let (block_import, babe_link) = babe::block_import(
|
||||
@@ -291,8 +292,11 @@ pub fn new_light<C: Send + Default + 'static>(config: NodeConfiguration<C>)
|
||||
let fetch_checker = fetcher
|
||||
.map(|fetcher| fetcher.checker().clone())
|
||||
.ok_or_else(|| "Trying to start light import queue without active fetch checker")?;
|
||||
let grandpa_block_import = grandpa::light_block_import::<_, _, _, RuntimeApi, _>(
|
||||
client.clone(), backend, Arc::new(fetch_checker), client.clone()
|
||||
let grandpa_block_import = grandpa::light_block_import::<_, _, _, RuntimeApi>(
|
||||
client.clone(),
|
||||
backend,
|
||||
&*client,
|
||||
Arc::new(fetch_checker),
|
||||
)?;
|
||||
|
||||
let finality_proof_import = grandpa_block_import.clone();
|
||||
|
||||
@@ -29,7 +29,6 @@ use node_primitives::{
|
||||
AccountId, AccountIndex, Balance, BlockNumber, Hash, Index,
|
||||
Moment, Signature,
|
||||
};
|
||||
use grandpa::fg_primitives;
|
||||
use client::{
|
||||
block_builder::api::{self as block_builder_api, InherentData, CheckInherentsResult},
|
||||
runtime_api as client_api, impl_runtime_apis
|
||||
@@ -46,7 +45,8 @@ use version::RuntimeVersion;
|
||||
#[cfg(any(feature = "std", test))]
|
||||
use version::NativeVersion;
|
||||
use primitives::OpaqueMetadata;
|
||||
use grandpa::{AuthorityId as GrandpaId, AuthorityWeight as GrandpaWeight};
|
||||
use grandpa::AuthorityList as GrandpaAuthorityList;
|
||||
use grandpa::fg_primitives;
|
||||
use im_online::sr25519::{AuthorityId as ImOnlineId};
|
||||
use transaction_payment_rpc_runtime_api::RuntimeDispatchInfo;
|
||||
use contracts_rpc_runtime_api::ContractExecResult;
|
||||
@@ -81,8 +81,8 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
|
||||
// and set impl_version to equal spec_version. If only runtime
|
||||
// implementation changes and behavior does not, then leave spec_version as
|
||||
// is and increment impl_version.
|
||||
spec_version: 192,
|
||||
impl_version: 191,
|
||||
spec_version: 193,
|
||||
impl_version: 193,
|
||||
apis: RUNTIME_API_VERSIONS,
|
||||
};
|
||||
|
||||
@@ -617,7 +617,7 @@ impl_runtime_apis! {
|
||||
}
|
||||
|
||||
impl fg_primitives::GrandpaApi<Block> for Runtime {
|
||||
fn grandpa_authorities() -> Vec<(GrandpaId, GrandpaWeight)> {
|
||||
fn grandpa_authorities() -> GrandpaAuthorityList {
|
||||
Grandpa::grandpa_authorities()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user