mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 19:01: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
@@ -26,6 +26,7 @@ runtime-primitives = { package = "sr-primitives", path = "../../core/sr-primitiv
|
||||
client = { package = "substrate-client", path = "../../core/client", default_features = false }
|
||||
consensus-aura = { package = "substrate-consensus-aura-primitives", path = "../../core/consensus/aura/primitives", default_features = false }
|
||||
offchain-primitives = { package = "substrate-offchain-primitives", path = "../../core/offchain/primitives", default-features = false }
|
||||
consensus_authorities = { package = "substrate-consensus-authorities", path = "../../core/consensus/authorities", default-features = false }
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
|
||||
@@ -234,10 +234,6 @@ impl_runtime_apis! {
|
||||
VERSION
|
||||
}
|
||||
|
||||
fn authorities() -> Vec<AuthorityId> {
|
||||
Consensus::authorities()
|
||||
}
|
||||
|
||||
fn execute_block(block: Block) {
|
||||
Executive::execute_block(block)
|
||||
}
|
||||
@@ -292,4 +288,10 @@ impl_runtime_apis! {
|
||||
Executive::offchain_worker(n)
|
||||
}
|
||||
}
|
||||
|
||||
impl consensus_authorities::AuthoritiesApi<Block> for Runtime {
|
||||
fn authorities() -> Vec<AuthorityId> {
|
||||
Consensus::authorities()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+15
@@ -1273,6 +1273,7 @@ dependencies = [
|
||||
"srml-timestamp 0.1.0",
|
||||
"substrate-client 0.1.0",
|
||||
"substrate-consensus-aura-primitives 0.1.0",
|
||||
"substrate-consensus-authorities 0.1.0",
|
||||
"substrate-offchain-primitives 0.1.0",
|
||||
"substrate-primitives 0.1.0",
|
||||
]
|
||||
@@ -2449,6 +2450,20 @@ dependencies = [
|
||||
"substrate-client 0.1.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "substrate-consensus-authorities"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"parity-codec 3.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sr-io 0.1.0",
|
||||
"sr-primitives 0.1.0",
|
||||
"sr-std 0.1.0",
|
||||
"sr-version 0.1.0",
|
||||
"srml-support 0.1.0",
|
||||
"substrate-client 0.1.0",
|
||||
"substrate-primitives 0.1.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "substrate-consensus-common"
|
||||
version = "0.1.0"
|
||||
|
||||
Reference in New Issue
Block a user