mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-11-11 21:27:06 +00:00
1 parent
b3e2a9e89c
commit
e6995cc997
18 files changed
+108
-74
No files matched your search
@@ -12,7 +12,7 @@ substrate-runtime-primitives = { path = "../runtime/primitives" }
|
||||
ed25519 = { path = "../ed25519" }
|
||||
tokio-timer = "0.1.2"
|
||||
parking_lot = "0.4"
|
||||
error-chain = "0.11"
|
||||
error-chain = "0.12"
|
||||
log = "0.3"
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
@@ -4,7 +4,7 @@ version = "0.1.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
||||
[dependencies]
|
||||
error-chain = "0.11"
|
||||
error-chain = "0.12"
|
||||
log = "0.3"
|
||||
parking_lot = "0.4"
|
||||
triehash = "0.1"
|
||||
|
||||
@@ -4,7 +4,7 @@ version = "0.1.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
||||
[dependencies]
|
||||
error-chain = "0.11"
|
||||
error-chain = "0.12"
|
||||
substrate-codec = { path = "../codec" }
|
||||
substrate-runtime-io = { path = "../runtime-io" }
|
||||
substrate-primitives = { path = "../primitives" }
|
||||
|
||||
@@ -4,7 +4,7 @@ version = "0.1.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
||||
[dependencies]
|
||||
error-chain = "0.11"
|
||||
error-chain = "0.12"
|
||||
futures = "0.1"
|
||||
log = "0.3"
|
||||
parking_lot = "0.4"
|
||||
|
||||
@@ -6,7 +6,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
||||
[dependencies]
|
||||
ethcore-crypto = { git = "https://github.com/paritytech/parity.git", default_features = false }
|
||||
ed25519 = { path = "../ed25519" }
|
||||
error-chain = "0.11"
|
||||
error-chain = "0.12"
|
||||
hex = "0.3"
|
||||
rand = "0.4"
|
||||
serde_json = "1.0"
|
||||
|
||||
@@ -84,7 +84,7 @@ impl EncryptedKey {
|
||||
|
||||
// two parts of derived key
|
||||
// DK = [ DK[0..15] DK[16..31] ] = [derived_left_bits, derived_right_bits]
|
||||
let (derived_left_bits, derived_right_bits) = crypto::derive_key_iterations(password, &salt, iterations);
|
||||
let (derived_left_bits, derived_right_bits) = crypto::derive_key_iterations(password.as_bytes(), &salt, iterations);
|
||||
|
||||
// preallocated (on-stack in case of `Secret`) buffer to hold cipher
|
||||
// length = length(plain) as we are using CTR-approach
|
||||
@@ -108,7 +108,7 @@ impl EncryptedKey {
|
||||
|
||||
fn decrypt(&self, password: &str) -> Result<[u8; PKCS_LEN]> {
|
||||
let (derived_left_bits, derived_right_bits) =
|
||||
crypto::derive_key_iterations(password, &self.salt, self.iterations);
|
||||
crypto::derive_key_iterations(password.as_bytes(), &self.salt, self.iterations);
|
||||
|
||||
let mac = crypto::derive_mac(&derived_right_bits, &self.ciphertext).keccak256();
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
||||
log = "0.3"
|
||||
rand = "0.3"
|
||||
parking_lot = "0.4"
|
||||
error-chain = "0.11"
|
||||
error-chain = "0.12"
|
||||
bitflags = "1.0"
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
|
||||
@@ -19,7 +19,7 @@ use std::sync::Arc;
|
||||
use std::io;
|
||||
use std::time::Duration;
|
||||
use futures::sync::{oneshot, mpsc};
|
||||
use network::{NetworkProtocolHandler, NetworkContext, HostInfo, PeerId, ProtocolId,
|
||||
use network::{NetworkProtocolHandler, NetworkContext, PeerId, ProtocolId,
|
||||
NetworkConfiguration , NonReservedPeerMode, ErrorKind};
|
||||
use network_devp2p::{NetworkService};
|
||||
use core_io::{TimerToken};
|
||||
@@ -175,9 +175,9 @@ impl<B: BlockT + 'static> Service<B> where B::Header: HeaderT<Number=u64> {
|
||||
}
|
||||
|
||||
fn start(&self) {
|
||||
match self.network.start().map_err(Into::into) {
|
||||
match self.network.start().map_err(|e| e.0.into()) {
|
||||
Err(ErrorKind::Io(ref e)) if e.kind() == io::ErrorKind::AddrInUse =>
|
||||
warn!("Network port {:?} is already in use, make sure that another instance of Polkadot client is not running or change the port using the --port option.", self.network.config().listen_address.expect("Listen address is not set.")),
|
||||
warn!("Network port is already in use, make sure that another instance of Polkadot client is not running or change the port using the --port option."),
|
||||
Err(err) => warn!("Error starting network: {}", err),
|
||||
_ => {},
|
||||
};
|
||||
@@ -257,7 +257,7 @@ impl<B: BlockT + 'static> ConsensusService<B> for Service<B> where B::Header: He
|
||||
}
|
||||
|
||||
impl<B: BlockT + 'static> NetworkProtocolHandler for ProtocolHandler<B> where B::Header: HeaderT<Number=u64> {
|
||||
fn initialize(&self, io: &NetworkContext, _host_info: &HostInfo) {
|
||||
fn initialize(&self, io: &NetworkContext) {
|
||||
io.register_timer(TICK_TOKEN, TICK_TIMEOUT)
|
||||
.expect("Error registering sync timer");
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ version = "0.1.0"
|
||||
authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
||||
[dependencies]
|
||||
error-chain = "0.11"
|
||||
error-chain = "0.12"
|
||||
jsonrpc-core = { git="https://github.com/paritytech/jsonrpc.git" }
|
||||
jsonrpc-macros = { git="https://github.com/paritytech/jsonrpc.git" }
|
||||
jsonrpc-pubsub = { git="https://github.com/paritytech/jsonrpc.git" }
|
||||
|
||||
Reference in new issue
Block a user