diff --git a/memorydb/Cargo.toml b/memorydb/Cargo.toml index ffb0be2..20c4365 100644 --- a/memorydb/Cargo.toml +++ b/memorydb/Cargo.toml @@ -11,10 +11,10 @@ elastic-array = "0.10" heapsize = "0.4" hashdb = { version = "0.2", path = "../hashdb" } plain_hasher = { version = "0.2", path = "../plain_hasher", default-features = false } -rlp = { version = "0.2", path = "../rlp", default-features = false } +rlp = { version = "0.3", path = "../rlp", default-features = false } [dev-dependencies] tiny-keccak = "1.4.2" ethereum-types = "0.4" keccak-hasher = { version = "0.1", path = "../test-support/keccak-hasher" } -keccak-hash = { version = "0.1", path = "../keccak-hash" } \ No newline at end of file +keccak-hash = { version = "0.1", path = "../keccak-hash" } diff --git a/patricia_trie/Cargo.toml b/patricia_trie/Cargo.toml index 80cfb88..285b3d4 100644 --- a/patricia_trie/Cargo.toml +++ b/patricia_trie/Cargo.toml @@ -18,7 +18,7 @@ env_logger = "0.5" ethereum-types = "0.4" keccak-hash = { version = "0.1", path = "../keccak-hash" } memorydb = { version = "0.2", path = "../memorydb", default-features = false } -rlp = { version = "0.2", path = "../rlp", default-features = false } +rlp = { version = "0.3.0", path = "../rlp", default-features = false } trie-standardmap = { version = "0.1", path = "../trie-standardmap", default-features = false } triehash = { version = "0.2", path = "../triehash", default-features = false } parity-bytes = { version = "0.1.0", path = "../parity-bytes" } diff --git a/rlp/Cargo.toml b/rlp/Cargo.toml index 0181df4..892707e 100644 --- a/rlp/Cargo.toml +++ b/rlp/Cargo.toml @@ -3,7 +3,7 @@ name = "rlp" description = "Recursive-length prefix encoding, decoding, and compression" repository = "https://github.com/paritytech/parity-common" license = "MIT/Apache-2.0" -version = "0.2.4" +version = "0.3.0" authors = ["Parity Technologies "] [dependencies] diff --git a/test-support/patricia-trie-ethereum/Cargo.toml b/test-support/patricia-trie-ethereum/Cargo.toml index d2a337e..9de3552 100644 --- a/test-support/patricia-trie-ethereum/Cargo.toml +++ b/test-support/patricia-trie-ethereum/Cargo.toml @@ -9,8 +9,8 @@ license = "GPL-3.0" patricia-trie = { version = "0.2", path = "../../patricia_trie" } keccak-hasher = { version = "0.1", path = "../keccak-hasher" } hashdb = { version = "0.2", path = "../../hashdb" } -rlp = { version = "0.2.3", path = "../../rlp" } +rlp = { version = "0.3.0", path = "../../rlp" } parity-bytes = { version = "0.1", path = "../../parity-bytes" } ethereum-types = "0.4" -elastic-array = "0.10" \ No newline at end of file +elastic-array = "0.10" diff --git a/test-support/patricia-trie-ethereum/src/rlp_node_codec.rs b/test-support/patricia-trie-ethereum/src/rlp_node_codec.rs index 414a129..d6a7493 100644 --- a/test-support/patricia-trie-ethereum/src/rlp_node_codec.rs +++ b/test-support/patricia-trie-ethereum/src/rlp_node_codec.rs @@ -75,14 +75,14 @@ impl NodeCodec for RlpNodeCodec { fn empty_node() -> ElasticArray1024 { let mut stream = RlpStream::new(); stream.append_empty_data(); - stream.drain() + ElasticArray1024::from_vec(stream.drain()) } fn leaf_node(partial: &[u8], value: &[u8]) -> ElasticArray1024 { let mut stream = RlpStream::new_list(2); stream.append(&partial); stream.append(&value); - stream.drain() + ElasticArray1024::from_vec(stream.drain()) } fn ext_node(partial: &[u8], child_ref: ChildReference<::Out>) -> ElasticArray1024 { @@ -95,7 +95,7 @@ impl NodeCodec for RlpNodeCodec { stream.append_raw(bytes, 1) }, }; - stream.drain() + ElasticArray1024::from_vec(stream.drain()) } fn branch_node(children: I, value: Option>) -> ElasticArray1024 @@ -119,6 +119,6 @@ impl NodeCodec for RlpNodeCodec { } else { stream.append_empty_data(); } - stream.drain() + ElasticArray1024::from_vec(stream.drain()) } } diff --git a/trie-standardmap/src/lib.rs b/trie-standardmap/src/lib.rs index 931dc57..f72b817 100644 --- a/trie-standardmap/src/lib.rs +++ b/trie-standardmap/src/lib.rs @@ -115,7 +115,7 @@ impl StandardMap { let v = match self.value_mode { ValueMode::Mirror => k.clone(), ValueMode::Random => Self::random_value(seed), - ValueMode::Index => encode(&index).into_vec(), + ValueMode::Index => encode(&index), }; d.push((k, v)) } diff --git a/triehash/Cargo.toml b/triehash/Cargo.toml index ed0df45..3d39c77 100644 --- a/triehash/Cargo.toml +++ b/triehash/Cargo.toml @@ -9,7 +9,7 @@ license = "GPL-3.0" [dependencies] elastic-array = "0.10" hashdb = { version = "0.2", path = "../hashdb", default-features = false } -rlp = { version = "0.2.4", path = "../rlp", default-features = false } +rlp = { version = "0.3", path = "../rlp", default-features = false } [dev-dependencies] trie-standardmap = { version = "0.1", path = "../trie-standardmap" } @@ -18,4 +18,4 @@ tiny-keccak = "1.4.2" ethereum-types = "0.4" [features] -ethereum = ["rlp/ethereum"] \ No newline at end of file +ethereum = ["rlp/ethereum"]