mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 07:41:08 +00:00
Move authorities interface from Core to consensus (#1412)
* Move authorities interface from Core to consensus f * notify all caches of block insert + create with up-to-date best_fin * merged authorities_are_cached from light_grandpa_import2 * Add ProvideCache trait * Create helper function for 'get_cache' * Fix some formatting * Bump impl version * Resolve wasm conflicts * Apply review comments * Use try_for_each * Move authorities interface from Core to consensus f * notify all caches of block insert + create with up-to-date best_fin * merged authorities_are_cached from light_grandpa_import2 * Add ProvideCache trait * Create helper function for 'get_cache' * Fix some formatting * Bump impl version * Resolve wasm conflicts * Apply review comments * Use try_for_each * Move authorities interface from Core to consensus f * notify all caches of block insert + create with up-to-date best_fin * merged authorities_are_cached from light_grandpa_import2 * Add ProvideCache trait * Create helper function for 'get_cache' * Fix some formatting * Bump impl version * Resolve wasm conflicts * Apply review comments * Use try_for_each * Increment impl_version * Update lib.rs
This commit is contained in:
committed by
Gav Wood
parent
55788fdf77
commit
cbfc36b39f
@@ -22,6 +22,7 @@ use runtime_primitives::Justification;
|
||||
use runtime_primitives::generic::BlockId;
|
||||
use primitives::Blake2Hasher;
|
||||
use runtime;
|
||||
use parity_codec::alloc::collections::hash_map::HashMap;
|
||||
|
||||
/// Extension trait for a test client.
|
||||
pub trait TestClient: Sized {
|
||||
@@ -60,7 +61,7 @@ impl<B, E, RA> TestClient for Client<B, E, runtime::Block, RA>
|
||||
fork_choice: ForkChoiceStrategy::LongestChain,
|
||||
};
|
||||
|
||||
self.import_block(import, None).map(|_| ())
|
||||
self.import_block(import, HashMap::new()).map(|_| ())
|
||||
}
|
||||
|
||||
fn import_justified(&self, origin: BlockOrigin, block: runtime::Block, justification: Justification)
|
||||
@@ -77,7 +78,7 @@ impl<B, E, RA> TestClient for Client<B, E, runtime::Block, RA>
|
||||
fork_choice: ForkChoiceStrategy::LongestChain,
|
||||
};
|
||||
|
||||
self.import_block(import, None).map(|_| ())
|
||||
self.import_block(import, HashMap::new()).map(|_| ())
|
||||
}
|
||||
|
||||
fn finalize_block(&self, id: BlockId<runtime::Block>, justification: Option<Justification>) -> client::error::Result<()> {
|
||||
|
||||
Reference in New Issue
Block a user