bump rlp v0.3.0 and make all workspace test pass

This commit is contained in:
Johann Tuffe 2018-08-21 17:57:30 +08:00
parent 2672c06633
commit a45d28d391
7 changed files with 13 additions and 13 deletions

View File

@ -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" }
keccak-hash = { version = "0.1", path = "../keccak-hash" }

View File

@ -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" }

View File

@ -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 <admin@parity.io>"]
[dependencies]

View File

@ -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"
elastic-array = "0.10"

View File

@ -75,14 +75,14 @@ impl NodeCodec<KeccakHasher> for RlpNodeCodec<KeccakHasher> {
fn empty_node() -> ElasticArray1024<u8> {
let mut stream = RlpStream::new();
stream.append_empty_data();
stream.drain()
ElasticArray1024::from_vec(stream.drain())
}
fn leaf_node(partial: &[u8], value: &[u8]) -> ElasticArray1024<u8> {
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<<KeccakHasher as Hasher>::Out>) -> ElasticArray1024<u8> {
@ -95,7 +95,7 @@ impl NodeCodec<KeccakHasher> for RlpNodeCodec<KeccakHasher> {
stream.append_raw(bytes, 1)
},
};
stream.drain()
ElasticArray1024::from_vec(stream.drain())
}
fn branch_node<I>(children: I, value: Option<ElasticArray128<u8>>) -> ElasticArray1024<u8>
@ -119,6 +119,6 @@ impl NodeCodec<KeccakHasher> for RlpNodeCodec<KeccakHasher> {
} else {
stream.append_empty_data();
}
stream.drain()
ElasticArray1024::from_vec(stream.drain())
}
}

View File

@ -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))
}

View File

@ -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"]
ethereum = ["rlp/ethereum"]