mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-18 16:25:40 +00:00
Keystore overhaul (#13615)
* Remove 'supported_keys' 'sign_with_any' and 'sign_with_all' from keystore trait * Remove the aync keystore * Renaming: - SyncCryptoStore -> Keystore - SyncCryptoStorePtr -> KeystorePtr - KeyStore -> MemoryKeystore * Fix authority discovery worker and tests * Rename 'insert_unknown' to 'insert' * Remove leftover
This commit is contained in:
@@ -49,7 +49,7 @@ use parity_scale_codec::{Decode, Encode};
|
||||
use sc_network::{NetworkBlock, NetworkSyncForkRequest, ReputationChange};
|
||||
use sc_network_gossip::{GossipEngine, Network as GossipNetwork};
|
||||
use sc_telemetry::{telemetry, TelemetryHandle, CONSENSUS_DEBUG, CONSENSUS_INFO};
|
||||
use sp_keystore::SyncCryptoStorePtr;
|
||||
use sp_keystore::KeystorePtr;
|
||||
use sp_runtime::traits::{Block as BlockT, Hash as HashT, Header as HeaderT, NumberFor};
|
||||
|
||||
use crate::{
|
||||
@@ -136,7 +136,7 @@ mod benefit {
|
||||
|
||||
/// A type that ties together our local authority id and a keystore where it is
|
||||
/// available for signing.
|
||||
pub struct LocalIdKeystore((AuthorityId, SyncCryptoStorePtr));
|
||||
pub struct LocalIdKeystore((AuthorityId, KeystorePtr));
|
||||
|
||||
impl LocalIdKeystore {
|
||||
/// Returns a reference to our local authority id.
|
||||
@@ -145,13 +145,13 @@ impl LocalIdKeystore {
|
||||
}
|
||||
|
||||
/// Returns a reference to the keystore.
|
||||
fn keystore(&self) -> SyncCryptoStorePtr {
|
||||
fn keystore(&self) -> KeystorePtr {
|
||||
(self.0).1.clone()
|
||||
}
|
||||
}
|
||||
|
||||
impl From<(AuthorityId, SyncCryptoStorePtr)> for LocalIdKeystore {
|
||||
fn from(inner: (AuthorityId, SyncCryptoStorePtr)) -> LocalIdKeystore {
|
||||
impl From<(AuthorityId, KeystorePtr)> for LocalIdKeystore {
|
||||
fn from(inner: (AuthorityId, KeystorePtr)) -> LocalIdKeystore {
|
||||
LocalIdKeystore(inner)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user