mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 05:51:02 +00:00
Make KeyStore optional (#2964)
This commit is contained in:
Generated
+4
-4
@@ -458,7 +458,7 @@ checksum = "6736e2428df2ca2848d846c43e88745121a6654696e349ce0054a420815a7409"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "beefy-gadget"
|
name = "beefy-gadget"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#5726a43094cad395d6e253bbc8b93ff7e54f2453"
|
source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#460ff08c8371958670d4075e1ba0551fab573757"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"beefy-primitives",
|
"beefy-primitives",
|
||||||
"futures 0.3.14",
|
"futures 0.3.14",
|
||||||
@@ -486,7 +486,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "beefy-gadget-rpc"
|
name = "beefy-gadget-rpc"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#5726a43094cad395d6e253bbc8b93ff7e54f2453"
|
source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#460ff08c8371958670d4075e1ba0551fab573757"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"beefy-gadget",
|
"beefy-gadget",
|
||||||
"beefy-primitives",
|
"beefy-primitives",
|
||||||
@@ -507,7 +507,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "beefy-primitives"
|
name = "beefy-primitives"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#5726a43094cad395d6e253bbc8b93ff7e54f2453"
|
source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#460ff08c8371958670d4075e1ba0551fab573757"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"parity-scale-codec",
|
"parity-scale-codec",
|
||||||
"sp-api",
|
"sp-api",
|
||||||
@@ -4530,7 +4530,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "pallet-beefy"
|
name = "pallet-beefy"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#5726a43094cad395d6e253bbc8b93ff7e54f2453"
|
source = "git+https://github.com/paritytech/grandpa-bridge-gadget?branch=master#460ff08c8371958670d4075e1ba0551fab573757"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"beefy-primitives",
|
"beefy-primitives",
|
||||||
"frame-support",
|
"frame-support",
|
||||||
|
|||||||
@@ -928,11 +928,19 @@ pub fn new_full<RuntimeApi, Executor>(
|
|||||||
task_manager.spawn_essential_handle().spawn_blocking("babe", babe);
|
task_manager.spawn_essential_handle().spawn_blocking("babe", babe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if the node isn't actively participating in consensus then it doesn't
|
||||||
|
// need a keystore, regardless of which protocol we use below.
|
||||||
|
let keystore_opt = if role.is_authority() {
|
||||||
|
Some(keystore_container.sync_keystore())
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
};
|
||||||
|
|
||||||
// We currently only run the BEEFY gadget on the Rococo and Wococo testnets.
|
// We currently only run the BEEFY gadget on the Rococo and Wococo testnets.
|
||||||
if chain_spec.is_rococo() || chain_spec.is_wococo() {
|
if chain_spec.is_rococo() || chain_spec.is_wococo() {
|
||||||
let gadget = beefy_gadget::start_beefy_gadget::<_, beefy_primitives::ecdsa::AuthorityPair, _, _, _, _>(
|
let gadget = beefy_gadget::start_beefy_gadget::<_, beefy_primitives::ecdsa::AuthorityPair, _, _, _, _>(
|
||||||
client.clone(),
|
client.clone(),
|
||||||
keystore_container.sync_keystore(),
|
keystore_opt.clone(),
|
||||||
network.clone(),
|
network.clone(),
|
||||||
beefy_link,
|
beefy_link,
|
||||||
network.clone(),
|
network.clone(),
|
||||||
@@ -949,14 +957,6 @@ pub fn new_full<RuntimeApi, Executor>(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if the node isn't actively participating in consensus then it doesn't
|
|
||||||
// need a keystore, regardless of which protocol we use below.
|
|
||||||
let keystore_opt = if role.is_authority() {
|
|
||||||
Some(keystore_container.sync_keystore())
|
|
||||||
} else {
|
|
||||||
None
|
|
||||||
};
|
|
||||||
|
|
||||||
let config = grandpa::Config {
|
let config = grandpa::Config {
|
||||||
// FIXME substrate#1578 make this available through chainspec
|
// FIXME substrate#1578 make this available through chainspec
|
||||||
gossip_duration: Duration::from_millis(1000),
|
gossip_duration: Duration::from_millis(1000),
|
||||||
|
|||||||
Reference in New Issue
Block a user