From fd930306f676d41921900d8db44da60b0d619e52 Mon Sep 17 00:00:00 2001 From: debris Date: Sat, 25 Mar 2017 15:55:23 +0700 Subject: [PATCH 1/4] updated mio to 0.6.6 --- Cargo.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index aac8ab34..59525f90 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -551,7 +551,7 @@ dependencies = [ [[package]] name = "mio" -version = "0.6.5" +version = "0.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "iovec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -559,7 +559,7 @@ dependencies = [ "lazycell 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "miow 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", + "miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "net2 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -578,7 +578,7 @@ dependencies = [ [[package]] name = "miow" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1105,7 +1105,7 @@ dependencies = [ "futures 0.1.11 (registry+https://github.com/rust-lang/crates.io-index)", "iovec 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "mio 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", + "mio 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "scoped-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-io 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1271,9 +1271,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum memchr 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "1dbccc0e46f1ea47b9f17e6d67c5a96bd27030519c519c9c91327e31275a47b4" "checksum mime 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b5c93a4bd787ddc6e7833c519b73a50883deb5863d76d9b71eb8216fb7f94e66" "checksum mio 0.6.1 (git+https://github.com/ethcore/mio.git)" = "" -"checksum mio 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)" = "aa30e3753079b08ce3d75cf3b44783e36fe0e1f64065f65c1d894d1688fb2580" +"checksum mio 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)" = "f27d38f824a0d267d55b29b171e9e99269a53812e385fa75c1fe700ae254a6a4" "checksum miow 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "3e690c5df6b2f60acd45d56378981e827ff8295562fc8d34f573deb267a59cd1" -"checksum miow 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3a78d2605eb97302c10cf944b8d96b0a2a890c52957caf92fcd1f24f69049579" +"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" "checksum murmur3 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ece7fe85164ffce69891c581b6b035a3c2f66dd3459f299d43d5efff90663e22" "checksum net2 0.2.27 (registry+https://github.com/rust-lang/crates.io-index)" = "18b9642ad6222faf5ce46f6966f59b71b9775ad5758c9e09fcf0a6c8061972b4" "checksum nix 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a0d95c5fa8b641c10ad0b8887454ebaafa3c92b5cd5350f8fc693adafd178e7b" From acb1cbdfd22ef75397b02b3edb6dff62b8ae5f83 Mon Sep 17 00:00:00 2001 From: debris Date: Sat, 25 Mar 2017 16:05:49 +0700 Subject: [PATCH 2/4] use tokio_io::AsyncRead in p2p lib --- Cargo.lock | 7 ++++--- p2p/Cargo.toml | 3 ++- p2p/src/io/handshake.rs | 9 +++++---- p2p/src/io/read_any_message.rs | 7 ++++--- p2p/src/io/read_header.rs | 8 +++++--- p2p/src/io/read_message.rs | 5 +++-- p2p/src/io/sharedtcpstream.rs | 3 +++ p2p/src/lib.rs | 1 + 8 files changed, 27 insertions(+), 16 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 59525f90..3e08ab2a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -699,6 +699,7 @@ dependencies = [ "serialization 0.1.0", "time 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-core 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1108,12 +1109,12 @@ dependencies = [ "mio 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "scoped-tls 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "tokio-io 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", + "tokio-io 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] name = "tokio-io" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ "bytes 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1319,7 +1320,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum thread_local 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)" = "8576dbbfcaef9641452d5cf0df9b0e7eeab7694956dd33bb61515fb8f18cfdd5" "checksum time 0.1.36 (registry+https://github.com/rust-lang/crates.io-index)" = "211b63c112206356ef1ff9b19355f43740fc3f85960c598a93d3a3d3ba7beade" "checksum tokio-core 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "99e958104a67877907c1454386d5482fe8e965a55d60be834a15a44328e7dc76" -"checksum tokio-io 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6a278fde45f1be68e44995227d426aaa4841e0980bb0a21b981092f28c3c8473" +"checksum tokio-io 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "48f55df1341bb92281f229a6030bc2abffde2c7a44c6d6b802b7687dd8be0775" "checksum unicase 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "13a5906ca2b98c799f4b1ab4557b76367ebd6ae5ef14930ec841c74aed5f3764" "checksum unicode-bidi 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)" = "d3a078ebdd62c0e71a709c3d53d2af693fe09fe93fbff8344aebe289b78f9032" "checksum unicode-normalization 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e28fa37426fceeb5cf8f41ee273faa7c82c47dc8fba5853402841e665fcd86ff" diff --git a/p2p/Cargo.toml b/p2p/Cargo.toml index c7472b5b..7127ea04 100644 --- a/p2p/Cargo.toml +++ b/p2p/Cargo.toml @@ -4,7 +4,8 @@ version = "0.1.0" authors = ["debris "] [dependencies] -tokio-core = "0.1" +tokio-core = "0.1.6" +tokio-io = "0.1.1" parking_lot = "0.3" futures = "0.1" futures-cpupool = "0.1" diff --git a/p2p/src/io/handshake.rs b/p2p/src/io/handshake.rs index c967df58..ffdd0c31 100644 --- a/p2p/src/io/handshake.rs +++ b/p2p/src/io/handshake.rs @@ -1,11 +1,12 @@ use std::{io, cmp}; use futures::{Future, Poll, Async}; +use tokio_io::AsyncRead; use message::{Message, MessageResult, Error}; use message::types::{Version, Verack}; use network::Magic; use io::{write_message, WriteMessage, ReadMessage, read_message}; -pub fn handshake(a: A, magic: Magic, version: Version, min_version: u32) -> Handshake where A: io::Write + io::Read { +pub fn handshake(a: A, magic: Magic, version: Version, min_version: u32) -> Handshake where A: io::Write + AsyncRead { Handshake { version: version.version(), state: HandshakeState::SendVersion(write_message(a, version_message(magic, version))), @@ -14,7 +15,7 @@ pub fn handshake(a: A, magic: Magic, version: Version, min_version: u32) -> H } } -pub fn accept_handshake(a: A, magic: Magic, version: Version, min_version: u32) -> AcceptHandshake where A: io::Write + io::Read { +pub fn accept_handshake(a: A, magic: Magic, version: Version, min_version: u32) -> AcceptHandshake where A: io::Write + AsyncRead { AcceptHandshake { version: version.version(), state: AcceptHandshakeState::ReceiveVersion { @@ -84,7 +85,7 @@ pub struct AcceptHandshake { min_version: u32, } -impl Future for Handshake where A: io::Read + io::Write { +impl Future for Handshake where A: AsyncRead + io::Write { type Item = (A, MessageResult); type Error = io::Error; @@ -135,7 +136,7 @@ impl Future for Handshake where A: io::Read + io::Write { } } -impl Future for AcceptHandshake where A: io::Read + io::Write { +impl Future for AcceptHandshake where A: AsyncRead + io::Write { type Item = (A, MessageResult); type Error = io::Error; diff --git a/p2p/src/io/read_any_message.rs b/p2p/src/io/read_any_message.rs index ec58acf2..63e43eff 100644 --- a/p2p/src/io/read_any_message.rs +++ b/p2p/src/io/read_any_message.rs @@ -1,13 +1,14 @@ use std::io; use futures::{Future, Poll, Async}; -use tokio_core::io::{read_exact, ReadExact}; +use tokio_io::io::{read_exact, ReadExact}; +use tokio_io::AsyncRead; use crypto::checksum; use network::Magic; use message::{Error, MessageHeader, MessageResult, Command}; use bytes::Bytes; use io::{read_header, ReadHeader}; -pub fn read_any_message(a: A, magic: Magic) -> ReadAnyMessage where A: io::Read { +pub fn read_any_message(a: A, magic: Magic) -> ReadAnyMessage where A: AsyncRead { ReadAnyMessage { state: ReadAnyMessageState::ReadHeader(read_header(a, magic)), } @@ -26,7 +27,7 @@ pub struct ReadAnyMessage { state: ReadAnyMessageState, } -impl Future for ReadAnyMessage where A: io::Read { +impl Future for ReadAnyMessage where A: AsyncRead { type Item = MessageResult<(Command, Bytes)>; type Error = io::Error; diff --git a/p2p/src/io/read_header.rs b/p2p/src/io/read_header.rs index 4e8ee5bd..806c7bac 100644 --- a/p2p/src/io/read_header.rs +++ b/p2p/src/io/read_header.rs @@ -1,10 +1,12 @@ use std::io; use futures::{Future, Poll, Async}; -use tokio_core::io::{ReadExact, read_exact}; +//use tokio_core::io::{ReadExact, read_exact}; +use tokio_io::AsyncRead; +use tokio_io::io::{ReadExact, read_exact}; use message::{MessageHeader, MessageResult}; use network::Magic; -pub fn read_header(a: A, magic: Magic) -> ReadHeader where A: io::Read { +pub fn read_header(a: A, magic: Magic) -> ReadHeader where A: AsyncRead { ReadHeader { reader: read_exact(a, [0u8; 24]), magic: magic, @@ -16,7 +18,7 @@ pub struct ReadHeader { magic: Magic, } -impl Future for ReadHeader where A: io::Read { +impl Future for ReadHeader where A: AsyncRead { type Item = (A, MessageResult); type Error = io::Error; diff --git a/p2p/src/io/read_message.rs b/p2p/src/io/read_message.rs index 227de3f8..a4935afc 100644 --- a/p2p/src/io/read_message.rs +++ b/p2p/src/io/read_message.rs @@ -1,12 +1,13 @@ use std::io; use std::marker::PhantomData; use futures::{Poll, Future, Async}; +use tokio_io::AsyncRead; use network::Magic; use message::{MessageResult, Error, Payload}; use io::{read_header, ReadHeader, read_payload, ReadPayload}; pub fn read_message(a: A, magic: Magic, version: u32) -> ReadMessage - where A: io::Read, M: Payload { + where A: AsyncRead, M: Payload { ReadMessage { state: ReadMessageState::ReadHeader { version: version, @@ -32,7 +33,7 @@ pub struct ReadMessage { message_type: PhantomData, } -impl Future for ReadMessage where A: io::Read, M: Payload { +impl Future for ReadMessage where A: AsyncRead, M: Payload { type Item = (A, MessageResult); type Error = io::Error; diff --git a/p2p/src/io/sharedtcpstream.rs b/p2p/src/io/sharedtcpstream.rs index 2e797d3e..62ed9582 100644 --- a/p2p/src/io/sharedtcpstream.rs +++ b/p2p/src/io/sharedtcpstream.rs @@ -1,6 +1,7 @@ use std::sync::Arc; use std::net::Shutdown; use std::io::{Read, Write, Error}; +use tokio_io::AsyncRead; use tokio_core::net::TcpStream; pub struct SharedTcpStream { @@ -32,6 +33,8 @@ impl Read for SharedTcpStream { } } +impl AsyncRead for SharedTcpStream {} + impl Write for SharedTcpStream { fn write(&mut self, buf: &[u8]) -> Result { Write::write(&mut (&*self.io as &TcpStream), buf) diff --git a/p2p/src/lib.rs b/p2p/src/lib.rs index 6f183238..0bbec45a 100644 --- a/p2p/src/lib.rs +++ b/p2p/src/lib.rs @@ -4,6 +4,7 @@ extern crate futures_cpupool; extern crate rand; extern crate time; extern crate tokio_core; +extern crate tokio_io; extern crate parking_lot; #[macro_use] extern crate log; From 35c74d894853691aea77b8a9b44255f641d57cbe Mon Sep 17 00:00:00 2001 From: debris Date: Sat, 25 Mar 2017 16:20:45 +0700 Subject: [PATCH 3/4] use tokio_io::AsyncWrite in p2p lib --- p2p/src/io/handshake.rs | 21 +++++++++++++++------ p2p/src/io/read_header.rs | 1 - p2p/src/io/read_payload.rs | 7 ++++--- p2p/src/io/sharedtcpstream.rs | 9 ++++++++- p2p/src/io/write_message.rs | 7 ++++--- p2p/src/net/channel.rs | 2 +- p2p/src/p2p.rs | 2 +- 7 files changed, 33 insertions(+), 16 deletions(-) diff --git a/p2p/src/io/handshake.rs b/p2p/src/io/handshake.rs index ffdd0c31..a26bcc77 100644 --- a/p2p/src/io/handshake.rs +++ b/p2p/src/io/handshake.rs @@ -1,12 +1,12 @@ use std::{io, cmp}; use futures::{Future, Poll, Async}; -use tokio_io::AsyncRead; +use tokio_io::{AsyncRead, AsyncWrite}; use message::{Message, MessageResult, Error}; use message::types::{Version, Verack}; use network::Magic; use io::{write_message, WriteMessage, ReadMessage, read_message}; -pub fn handshake(a: A, magic: Magic, version: Version, min_version: u32) -> Handshake where A: io::Write + AsyncRead { +pub fn handshake(a: A, magic: Magic, version: Version, min_version: u32) -> Handshake where A: AsyncWrite + AsyncRead { Handshake { version: version.version(), state: HandshakeState::SendVersion(write_message(a, version_message(magic, version))), @@ -15,7 +15,7 @@ pub fn handshake(a: A, magic: Magic, version: Version, min_version: u32) -> H } } -pub fn accept_handshake(a: A, magic: Magic, version: Version, min_version: u32) -> AcceptHandshake where A: io::Write + AsyncRead { +pub fn accept_handshake(a: A, magic: Magic, version: Version, min_version: u32) -> AcceptHandshake where A: AsyncWrite + AsyncRead { AcceptHandshake { version: version.version(), state: AcceptHandshakeState::ReceiveVersion { @@ -85,7 +85,7 @@ pub struct AcceptHandshake { min_version: u32, } -impl Future for Handshake where A: AsyncRead + io::Write { +impl Future for Handshake where A: AsyncRead + AsyncWrite { type Item = (A, MessageResult); type Error = io::Error; @@ -136,7 +136,7 @@ impl Future for Handshake where A: AsyncRead + io::Write { } } -impl Future for AcceptHandshake where A: AsyncRead + io::Write { +impl Future for AcceptHandshake where A: AsyncRead + AsyncWrite { type Item = (A, MessageResult); type Error = io::Error; @@ -197,7 +197,8 @@ impl Future for AcceptHandshake where A: AsyncRead + io::Write { #[cfg(test)] mod tests { use std::io; - use futures::Future; + use futures::{Future, Poll}; + use tokio_io::{AsyncRead, AsyncWrite}; use bytes::Bytes; use ser::Stream; use network::Magic; @@ -217,6 +218,8 @@ mod tests { } } + impl AsyncRead for TestIo {} + impl io::Write for TestIo { fn write(&mut self, buf: &[u8]) -> io::Result { io::Write::write(&mut self.write, buf) @@ -227,6 +230,12 @@ mod tests { } } + impl AsyncWrite for TestIo { + fn shutdown(&mut self) -> Poll<(), io::Error> { + Ok(().into()) + } + } + fn local_version() -> Version { Version::V70001(V0 { version: 70001, diff --git a/p2p/src/io/read_header.rs b/p2p/src/io/read_header.rs index 806c7bac..dd504c68 100644 --- a/p2p/src/io/read_header.rs +++ b/p2p/src/io/read_header.rs @@ -1,6 +1,5 @@ use std::io; use futures::{Future, Poll, Async}; -//use tokio_core::io::{ReadExact, read_exact}; use tokio_io::AsyncRead; use tokio_io::io::{ReadExact, read_exact}; use message::{MessageHeader, MessageResult}; diff --git a/p2p/src/io/read_payload.rs b/p2p/src/io/read_payload.rs index c8624311..693dd951 100644 --- a/p2p/src/io/read_payload.rs +++ b/p2p/src/io/read_payload.rs @@ -1,14 +1,15 @@ use std::io; use std::marker::PhantomData; use futures::{Poll, Future}; -use tokio_core::io::{read_exact, ReadExact}; +use tokio_io::AsyncRead; +use tokio_io::io::{read_exact, ReadExact}; use bytes::Bytes; use hash::H32; use crypto::checksum; use message::{Error, MessageResult, Payload, deserialize_payload}; pub fn read_payload(a: A, version: u32, len: usize, checksum: H32) -> ReadPayload - where A: io::Read, M: Payload { + where A: AsyncRead, M: Payload { ReadPayload { reader: read_exact(a, Bytes::new_with_len(len)), version: version, @@ -24,7 +25,7 @@ pub struct ReadPayload { payload_type: PhantomData, } -impl Future for ReadPayload where A: io::Read, M: Payload { +impl Future for ReadPayload where A: AsyncRead, M: Payload { type Item = (A, MessageResult); type Error = io::Error; diff --git a/p2p/src/io/sharedtcpstream.rs b/p2p/src/io/sharedtcpstream.rs index 62ed9582..bc551e2f 100644 --- a/p2p/src/io/sharedtcpstream.rs +++ b/p2p/src/io/sharedtcpstream.rs @@ -1,7 +1,8 @@ use std::sync::Arc; use std::net::Shutdown; use std::io::{Read, Write, Error}; -use tokio_io::AsyncRead; +use futures::Poll; +use tokio_io::{AsyncRead, AsyncWrite}; use tokio_core::net::TcpStream; pub struct SharedTcpStream { @@ -35,6 +36,12 @@ impl Read for SharedTcpStream { impl AsyncRead for SharedTcpStream {} +impl AsyncWrite for SharedTcpStream { + fn shutdown(&mut self) -> Poll<(), Error> { + self.io.shutdown(Shutdown::Both).map(Into::into) + } +} + impl Write for SharedTcpStream { fn write(&mut self, buf: &[u8]) -> Result { Write::write(&mut (&*self.io as &TcpStream), buf) diff --git a/p2p/src/io/write_message.rs b/p2p/src/io/write_message.rs index a4bc2123..675bd3ad 100644 --- a/p2p/src/io/write_message.rs +++ b/p2p/src/io/write_message.rs @@ -1,9 +1,10 @@ use std::io; use futures::{Future, Poll}; -use tokio_core::io::{WriteAll, write_all}; +use tokio_io::AsyncWrite; +use tokio_io::io::{WriteAll, write_all}; use message::Message; -pub fn write_message(a: A, message: Message) -> WriteMessage where A: io::Write { +pub fn write_message(a: A, message: Message) -> WriteMessage where A: AsyncWrite { WriteMessage { future: write_all(a, message), } @@ -13,7 +14,7 @@ pub struct WriteMessage { future: WriteAll>, } -impl Future for WriteMessage where A: io::Write { +impl Future for WriteMessage where A: AsyncWrite { type Item = (A, Message); type Error = io::Error; diff --git a/p2p/src/net/channel.rs b/p2p/src/net/channel.rs index fb255f55..361924f2 100644 --- a/p2p/src/net/channel.rs +++ b/p2p/src/net/channel.rs @@ -1,4 +1,4 @@ -use tokio_core::io::{write_all, WriteAll}; +use tokio_io::io::{write_all, WriteAll}; use session::Session; use io::{SharedTcpStream, read_any_message, ReadAnyMessage}; use util::PeerInfo; diff --git a/p2p/src/p2p.rs b/p2p/src/p2p.rs index 755062ea..013c5f6d 100644 --- a/p2p/src/p2p.rs +++ b/p2p/src/p2p.rs @@ -5,7 +5,7 @@ use parking_lot::RwLock; use futures::{Future, finished, failed, BoxFuture}; use futures::stream::Stream; use futures_cpupool::CpuPool; -use tokio_core::io::IoFuture; +use tokio_io::IoFuture; use tokio_core::net::{TcpListener, TcpStream}; use tokio_core::reactor::{Handle, Remote, Timeout, Interval}; use abstract_ns::Resolver; From cd5287bb2d57e548946ce3f411babb5c943d112c Mon Sep 17 00:00:00 2001 From: debris Date: Sun, 26 Mar 2017 15:17:28 +0700 Subject: [PATCH 4/4] updated parking_lot to 0.4 --- Cargo.lock | 25 +++++++++++++++++-------- db/Cargo.toml | 2 +- p2p/Cargo.toml | 2 +- sync/Cargo.toml | 2 +- 4 files changed, 20 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3e08ab2a..856c6d76 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -209,7 +209,7 @@ dependencies = [ "ethcore-devtools 1.3.0", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "lru-cache 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "primitives 0.1.0", "rocksdb 0.4.5 (git+https://github.com/ethcore/rust-rocksdb)", "serialization 0.1.0", @@ -677,8 +677,11 @@ dependencies = [ [[package]] name = "owning_ref" -version = "0.2.4" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" +dependencies = [ + "stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", +] [[package]] name = "p2p" @@ -693,7 +696,7 @@ dependencies = [ "message 0.1.0", "network 0.1.0", "ns-dns-tokio 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", - "parking_lot 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "primitives 0.1.0", "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", "serialization 0.1.0", @@ -704,10 +707,10 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.3.8" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" dependencies = [ - "owning_ref 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", + "owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "parking_lot_core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "thread-id 3.0.0 (registry+https://github.com/rust-lang/crates.io-index)", ] @@ -988,6 +991,11 @@ name = "spmc" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" +[[package]] +name = "stable_deref_trait" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" + [[package]] name = "strsim" version = "0.6.0" @@ -1021,7 +1029,7 @@ dependencies = [ "murmur3 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "network 0.1.0", "p2p 0.1.0", - "parking_lot 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)", + "parking_lot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "primitives 0.1.0", "rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", "script 0.1.0", @@ -1284,8 +1292,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum num_cpus 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a18c392466409c50b87369414a2680c93e739aedeb498eb2bff7d7eb569744e2" "checksum odds 0.2.25 (registry+https://github.com/rust-lang/crates.io-index)" = "c3df9b730298cea3a1c3faa90b7e2f9df3a9c400d0936d6015e6165734eefcba" "checksum ole32-sys 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5d2c49021782e5233cd243168edfa8037574afed4eba4bbaf538b3d8d1789d8c" -"checksum owning_ref 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)" = "9d52571ddcb42e9c900c901a18d8d67e393df723fcd51dd59c5b1a85d0acb6cc" -"checksum parking_lot 0.3.8 (registry+https://github.com/rust-lang/crates.io-index)" = "fa12d706797d42551663426a45e2db2e0364bd1dbf6aeada87e89c5f981f43e9" +"checksum owning_ref 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cdf84f41639e037b484f93433aa3897863b561ed65c6e59c7073d7c561710f37" +"checksum parking_lot 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "aebb68eebde2c99f89592d925288600fde220177e46b5c9a91ca218d245aeedf" "checksum parking_lot_core 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fb1b97670a2ffadce7c397fb80a3d687c4f3060140b885621ef1653d0e5d5068" "checksum quick-error 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0aad603e8d7fb67da22dbdf1f4b826ce8829e406124109e73cf1b2454b93a71c" "checksum quote 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e920b65c65f10b2ae65c831a81a073a89edd28c7cce89475bff467ab4167a" @@ -1311,6 +1319,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" "checksum slab 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "17b4fcaed89ab08ef143da37bc52adbcc04d4a69014f4c1208d6b51f0c47bc23" "checksum smallvec 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "fcc8d19212aacecf95e4a7a2179b26f7aeb9732a915cf01f05b0d3e044865410" "checksum spmc 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "93bdab61c1a413e591c4d17388ffa859eaff2df27f1e13a5ec8b716700605adf" +"checksum stable_deref_trait 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "15132e0e364248108c5e2c02e3ab539be8d6f5d52a01ca9bbf27ed657316f02b" "checksum strsim 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b4d15c810519a91cf877e7e36e63fe068815c678181439f2f29e2562147c3694" "checksum syn 0.11.9 (registry+https://github.com/rust-lang/crates.io-index)" = "480c834701caba3548aa991e54677281be3a5414a9d09ddbdf4ed74a569a9d19" "checksum synom 0.11.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a393066ed9010ebaed60b9eafa373d4b1baac186dd7e008555b0f702b51945b6" diff --git a/db/Cargo.toml b/db/Cargo.toml index 8e92b355..71d9be3c 100644 --- a/db/Cargo.toml +++ b/db/Cargo.toml @@ -11,7 +11,7 @@ primitives = { path = "../primitives" } byteorder = "1.0" chain = { path = "../chain" } serialization = { path = "../serialization" } -parking_lot = "0.3" +parking_lot = "0.4" test-data = { path = "../test-data" } bit-vec = "0.4" log = "0.3" diff --git a/p2p/Cargo.toml b/p2p/Cargo.toml index 7127ea04..37d40d60 100644 --- a/p2p/Cargo.toml +++ b/p2p/Cargo.toml @@ -6,7 +6,7 @@ authors = ["debris "] [dependencies] tokio-core = "0.1.6" tokio-io = "0.1.1" -parking_lot = "0.3" +parking_lot = "0.4" futures = "0.1" futures-cpupool = "0.1" time = "0.1" diff --git a/sync/Cargo.toml b/sync/Cargo.toml index 23776899..4f9733e9 100644 --- a/sync/Cargo.toml +++ b/sync/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Ethcore "] [dependencies] -parking_lot = "0.3" +parking_lot = "0.4" log = "0.3" time = "0.1" futures = "0.1"