mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 21:37:56 +00:00
Generic keystore (#3008)
* Add KeyTypeId. * Implement clone for sr25519::Pair. * Extend Pair with to_raw_vec. * Implement TypedKey for Signature and Pair. * Add trait Public. * Make keystore generic. * Fixup clone. * Fix tests. * Update service. * Fix imports. * Fix build. * Fix babe build. * Fix subkey build. * Make authority setup generic. * Update node-template. * Fix build. * Remove unsafe code. * Fix tests.
This commit is contained in:
@@ -65,8 +65,8 @@ construct_service_factory! {
|
||||
FullComponents::<Factory>::new(config)
|
||||
},
|
||||
AuthoritySetup = {
|
||||
|service: Self::FullService, key: Option<Arc<Pair>>| {
|
||||
if let Some(key) = key {
|
||||
|service: Self::FullService| {
|
||||
if let Some(key) = service.authority_key::<Pair>() {
|
||||
info!("Using authority key {}", key.public());
|
||||
let proposer = Arc::new(ProposerFactory {
|
||||
client: service.client(),
|
||||
@@ -77,7 +77,7 @@ construct_service_factory! {
|
||||
.ok_or_else(|| ServiceError::SelectChainRequired)?;
|
||||
let aura = start_aura(
|
||||
SlotDuration::get_or_compute(&*client)?,
|
||||
key.clone(),
|
||||
Arc::new(key),
|
||||
client.clone(),
|
||||
select_chain,
|
||||
client,
|
||||
|
||||
Reference in New Issue
Block a user