mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-21 15:35:42 +00:00
Add warning about secp256k1 network keys (#2764)
This commit is contained in:
committed by
Bastian Köcher
parent
8e0a14fe7a
commit
9904da17bb
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
behaviour::Behaviour,
|
behaviour::Behaviour,
|
||||||
|
config::NodeKeyConfig,
|
||||||
transport, NetworkState, NetworkStatePeer, NetworkStateNotConnectedPeer
|
transport, NetworkState, NetworkStatePeer, NetworkStateNotConnectedPeer
|
||||||
};
|
};
|
||||||
use crate::custom_proto::{CustomProto, CustomProtoOut, CustomMessage, RegisteredProtocol};
|
use crate::custom_proto::{CustomProto, CustomProtoOut, CustomMessage, RegisteredProtocol};
|
||||||
@@ -79,6 +80,9 @@ where TMessage: CustomMessage + Send + 'static {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Private and public keys configuration.
|
// Private and public keys configuration.
|
||||||
|
if let NodeKeyConfig::Secp256k1(_) = config.node_key {
|
||||||
|
warn!(target: "sub-libp2p", "Secp256k1 keys are deprecated in favour of ed25519");
|
||||||
|
}
|
||||||
let local_identity = config.node_key.clone().into_keypair()?;
|
let local_identity = config.node_key.clone().into_keypair()?;
|
||||||
let local_public = local_identity.public();
|
let local_public = local_identity.public();
|
||||||
let local_peer_id = local_public.clone().into_peer_id();
|
let local_peer_id = local_public.clone().into_peer_id();
|
||||||
|
|||||||
Reference in New Issue
Block a user