Skip to content
Snippets Groups Projects
Commit b32653d0 authored by Shawn Tabrizi's avatar Shawn Tabrizi Committed by Bastian Köcher
Browse files

Update AccountId to use sr25519 in node-template (#2119)

parent 2ca08a95
No related merge requests found
......@@ -11,7 +11,7 @@ use parity_codec::{Encode, Decode};
use rstd::prelude::*;
#[cfg(feature = "std")]
use primitives::bytes;
use primitives::{ed25519, OpaqueMetadata};
use primitives::{ed25519, sr25519, OpaqueMetadata};
use runtime_primitives::{
ApplyResult, transaction_validity::TransactionValidity, generic, create_runtime_str,
traits::{self, NumberFor, BlakeTwo256, Block as BlockT, StaticLookup, Verify}
......@@ -44,7 +44,7 @@ pub type AuthoritySignature = ed25519::Signature;
pub type AccountId = <AccountSignature as Verify>::Signer;
/// The type used by authorities to prove their ID.
pub type AccountSignature = ed25519::Signature;
pub type AccountSignature = sr25519::Signature;
/// A hash of some data used by the chain.
pub type Hash = primitives::H256;
......
use primitives::{ed25519, Pair};
use primitives::{ed25519, sr25519, Pair};
use node_template_runtime::{
AccountId, GenesisConfig, ConsensusConfig, TimestampConfig, BalancesConfig,
SudoConfig, IndicesConfig,
......@@ -31,7 +31,7 @@ fn authority_key(s: &str) -> AuthorityId {
}
fn account_key(s: &str) -> AccountId {
ed25519::Pair::from_string(&format!("//{}", s), None)
sr25519::Pair::from_string(&format!("//{}", s), None)
.expect("static values are valid; qed")
.public()
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment