bump rlp v0.3.0 and make all workspace test pass
This commit is contained in:
parent
2672c06633
commit
a45d28d391
|
@ -11,7 +11,7 @@ elastic-array = "0.10"
|
||||||
heapsize = "0.4"
|
heapsize = "0.4"
|
||||||
hashdb = { version = "0.2", path = "../hashdb" }
|
hashdb = { version = "0.2", path = "../hashdb" }
|
||||||
plain_hasher = { version = "0.2", path = "../plain_hasher", default-features = false }
|
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]
|
[dev-dependencies]
|
||||||
tiny-keccak = "1.4.2"
|
tiny-keccak = "1.4.2"
|
||||||
|
|
|
@ -18,7 +18,7 @@ env_logger = "0.5"
|
||||||
ethereum-types = "0.4"
|
ethereum-types = "0.4"
|
||||||
keccak-hash = { version = "0.1", path = "../keccak-hash" }
|
keccak-hash = { version = "0.1", path = "../keccak-hash" }
|
||||||
memorydb = { version = "0.2", path = "../memorydb", default-features = false }
|
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 }
|
trie-standardmap = { version = "0.1", path = "../trie-standardmap", default-features = false }
|
||||||
triehash = { version = "0.2", path = "../triehash", default-features = false }
|
triehash = { version = "0.2", path = "../triehash", default-features = false }
|
||||||
parity-bytes = { version = "0.1.0", path = "../parity-bytes" }
|
parity-bytes = { version = "0.1.0", path = "../parity-bytes" }
|
||||||
|
|
|
@ -3,7 +3,7 @@ name = "rlp"
|
||||||
description = "Recursive-length prefix encoding, decoding, and compression"
|
description = "Recursive-length prefix encoding, decoding, and compression"
|
||||||
repository = "https://github.com/paritytech/parity-common"
|
repository = "https://github.com/paritytech/parity-common"
|
||||||
license = "MIT/Apache-2.0"
|
license = "MIT/Apache-2.0"
|
||||||
version = "0.2.4"
|
version = "0.3.0"
|
||||||
authors = ["Parity Technologies <admin@parity.io>"]
|
authors = ["Parity Technologies <admin@parity.io>"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
|
@ -9,7 +9,7 @@ license = "GPL-3.0"
|
||||||
patricia-trie = { version = "0.2", path = "../../patricia_trie" }
|
patricia-trie = { version = "0.2", path = "../../patricia_trie" }
|
||||||
keccak-hasher = { version = "0.1", path = "../keccak-hasher" }
|
keccak-hasher = { version = "0.1", path = "../keccak-hasher" }
|
||||||
hashdb = { version = "0.2", path = "../../hashdb" }
|
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" }
|
parity-bytes = { version = "0.1", path = "../../parity-bytes" }
|
||||||
|
|
||||||
ethereum-types = "0.4"
|
ethereum-types = "0.4"
|
||||||
|
|
|
@ -75,14 +75,14 @@ impl NodeCodec<KeccakHasher> for RlpNodeCodec<KeccakHasher> {
|
||||||
fn empty_node() -> ElasticArray1024<u8> {
|
fn empty_node() -> ElasticArray1024<u8> {
|
||||||
let mut stream = RlpStream::new();
|
let mut stream = RlpStream::new();
|
||||||
stream.append_empty_data();
|
stream.append_empty_data();
|
||||||
stream.drain()
|
ElasticArray1024::from_vec(stream.drain())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn leaf_node(partial: &[u8], value: &[u8]) -> ElasticArray1024<u8> {
|
fn leaf_node(partial: &[u8], value: &[u8]) -> ElasticArray1024<u8> {
|
||||||
let mut stream = RlpStream::new_list(2);
|
let mut stream = RlpStream::new_list(2);
|
||||||
stream.append(&partial);
|
stream.append(&partial);
|
||||||
stream.append(&value);
|
stream.append(&value);
|
||||||
stream.drain()
|
ElasticArray1024::from_vec(stream.drain())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn ext_node(partial: &[u8], child_ref: ChildReference<<KeccakHasher as Hasher>::Out>) -> ElasticArray1024<u8> {
|
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.append_raw(bytes, 1)
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
stream.drain()
|
ElasticArray1024::from_vec(stream.drain())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn branch_node<I>(children: I, value: Option<ElasticArray128<u8>>) -> ElasticArray1024<u8>
|
fn branch_node<I>(children: I, value: Option<ElasticArray128<u8>>) -> ElasticArray1024<u8>
|
||||||
|
@ -119,6 +119,6 @@ impl NodeCodec<KeccakHasher> for RlpNodeCodec<KeccakHasher> {
|
||||||
} else {
|
} else {
|
||||||
stream.append_empty_data();
|
stream.append_empty_data();
|
||||||
}
|
}
|
||||||
stream.drain()
|
ElasticArray1024::from_vec(stream.drain())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,7 +115,7 @@ impl StandardMap {
|
||||||
let v = match self.value_mode {
|
let v = match self.value_mode {
|
||||||
ValueMode::Mirror => k.clone(),
|
ValueMode::Mirror => k.clone(),
|
||||||
ValueMode::Random => Self::random_value(seed),
|
ValueMode::Random => Self::random_value(seed),
|
||||||
ValueMode::Index => encode(&index).into_vec(),
|
ValueMode::Index => encode(&index),
|
||||||
};
|
};
|
||||||
d.push((k, v))
|
d.push((k, v))
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ license = "GPL-3.0"
|
||||||
[dependencies]
|
[dependencies]
|
||||||
elastic-array = "0.10"
|
elastic-array = "0.10"
|
||||||
hashdb = { version = "0.2", path = "../hashdb", default-features = false }
|
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]
|
[dev-dependencies]
|
||||||
trie-standardmap = { version = "0.1", path = "../trie-standardmap" }
|
trie-standardmap = { version = "0.1", path = "../trie-standardmap" }
|
||||||
|
|
Loading…
Reference in New Issue