mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-30 04:57:57 +00:00
impl HasCompact for Perbill and Permill (#1411)
* impl Compact<> and HasCompact for Permill Perbill * update parity-codec to 2.2 * add Cargo.lock * add lock and build for runtime * rebuild Cargo.lock after rebase
This commit is contained in:
committed by
Bastian Köcher
parent
da1fb3f273
commit
beeacf9cfa
@@ -5,7 +5,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
||||
[dependencies]
|
||||
log = "0.4"
|
||||
parity-codec = "2.1"
|
||||
parity-codec = "2.2"
|
||||
sr-primitives = { path = "../../core/sr-primitives" }
|
||||
substrate-client = { path = "../../core/client" }
|
||||
substrate-consensus-aura-primitives = { path = "../../core/consensus/aura/primitives" }
|
||||
|
||||
@@ -15,7 +15,7 @@ substrate-primitives = { path = "../../primitives" }
|
||||
sr-primitives = { path = "../../sr-primitives" }
|
||||
substrate-client = { path = "../../client" }
|
||||
substrate-state-machine = { path = "../../state-machine" }
|
||||
parity-codec = "2.1"
|
||||
parity-codec = "2.2"
|
||||
parity-codec-derive = "2.1"
|
||||
substrate-executor = { path = "../../executor" }
|
||||
substrate-state-db = { path = "../../state-db" }
|
||||
|
||||
@@ -5,7 +5,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
||||
description = "Aura consensus algorithm for substrate"
|
||||
|
||||
[dependencies]
|
||||
parity-codec = "2.1"
|
||||
parity-codec = "2.2"
|
||||
substrate-client = { path = "../../client" }
|
||||
substrate-primitives = { path = "../../primitives" }
|
||||
srml-support = { path = "../../../srml/support" }
|
||||
|
||||
@@ -5,7 +5,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
||||
description = "Primitives for Aura consensus"
|
||||
|
||||
[dependencies]
|
||||
parity-codec = { version = "2.1", default-features = false }
|
||||
parity-codec = { version = "2.2", default-features = false }
|
||||
substrate-client = { path = "../../../client", default-features = false }
|
||||
substrate-primitives = { path = "../../../primitives", default-features = false }
|
||||
srml-support = { path = "../../../../srml/support", default-features = false }
|
||||
|
||||
@@ -13,7 +13,7 @@ futures = "0.1"
|
||||
sr-version = { path = "../../sr-version" }
|
||||
sr-primitives = { path = "../../sr-primitives" }
|
||||
tokio = "0.1.7"
|
||||
parity-codec = "2.1"
|
||||
parity-codec = "2.2"
|
||||
parity-codec-derive = "2.0"
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
@@ -6,7 +6,7 @@ description = "Rhododendron Round-Based consensus-algorithm for substrate"
|
||||
|
||||
[dependencies]
|
||||
futures = "0.1.17"
|
||||
parity-codec = { version = "2.1" }
|
||||
parity-codec = { version = "2.2" }
|
||||
parity-codec-derive = { version = "2.0" }
|
||||
substrate-primitives = { path = "../../primitives" }
|
||||
substrate-consensus-common = { path = "../common" }
|
||||
|
||||
@@ -5,7 +5,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
||||
[dependencies]
|
||||
error-chain = "0.12"
|
||||
parity-codec = "2.1"
|
||||
parity-codec = "2.2"
|
||||
sr-io = { path = "../sr-io" }
|
||||
substrate-primitives = { path = "../primitives" }
|
||||
substrate-trie = { path = "../trie" }
|
||||
|
||||
Generated
+6
-6
@@ -47,7 +47,7 @@ name = "impl-codec"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -57,7 +57,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
|
||||
[[package]]
|
||||
name = "parity-codec"
|
||||
version = "2.1.5"
|
||||
version = "2.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"arrayvec 0.4.7 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -145,7 +145,7 @@ name = "sr-io"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"hash-db 0.9.0 (git+https://github.com/paritytech/trie)",
|
||||
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sr-std 0.1.0",
|
||||
"substrate-primitives 0.1.0",
|
||||
@@ -155,7 +155,7 @@ dependencies = [
|
||||
name = "sr-sandbox"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sr-std 0.1.0",
|
||||
"substrate-primitives 0.1.0",
|
||||
@@ -180,7 +180,7 @@ dependencies = [
|
||||
"byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hash-db 0.9.0 (git+https://github.com/paritytech/trie)",
|
||||
"hash256-std-hasher 0.9.0 (git+https://github.com/paritytech/trie)",
|
||||
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"primitive-types 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc-hex 2.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -223,7 +223,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
"checksum hash256-std-hasher 0.9.0 (git+https://github.com/paritytech/trie)" = "<none>"
|
||||
"checksum impl-codec 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9c88568d828291c50eed30cd7fb9f8e688ad0013620186fa3e777b9f206c79f2"
|
||||
"checksum nodrop 0.1.12 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2228dca57108069a5262f2ed8bd2e82496d2e074a06d1ccc7ce1687b6ae0a2"
|
||||
"checksum parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "dca389ea5e1632c89b2ce54f7e2b4a8a8c9d278042222a91e0bf95451218cb4c"
|
||||
"checksum parity-codec 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e7b6a1290fe78aa6bbb5f3338ecede3062687a98b9e40cd1dbcaa47261d44097"
|
||||
"checksum parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ffa42c2cb493b60b12c75b26e8c94cb734af4df4d7f2cc229dc04c1953dac189"
|
||||
"checksum primitive-types 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f47c18b4601125931d69fcf7b000c2c16a304e4f84d58218d6470b4502e00b58"
|
||||
"checksum proc-macro2 0.4.19 (registry+https://github.com/rust-lang/crates.io-index)" = "ffe022fb8c8bd254524b0b3305906c1921fa37a84a644e29079a9e62200c3901"
|
||||
|
||||
@@ -5,7 +5,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
||||
[dependencies]
|
||||
futures = "0.1"
|
||||
parity-codec = "2.1"
|
||||
parity-codec = "2.2"
|
||||
parity-codec-derive = "2.0"
|
||||
sr-primitives = { path = "../sr-primitives" }
|
||||
substrate-consensus-common = { path = "../consensus/common" }
|
||||
|
||||
@@ -6,7 +6,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
||||
[dependencies]
|
||||
substrate-client = { path = "../../client", default-features = false }
|
||||
substrate-primitives = { path = "../../primitives", default-features = false }
|
||||
parity-codec = { version = "2.1", default-features = false }
|
||||
parity-codec = { version = "2.2", default-features = false }
|
||||
parity-codec-derive = { version = "2.1", default-features = false }
|
||||
sr-primitives = { path = "../../sr-primitives", default-features = false }
|
||||
sr-std = { path = "../../sr-std", default-features = false }
|
||||
|
||||
@@ -20,7 +20,7 @@ substrate-primitives = { path = "../../core/primitives" }
|
||||
substrate-consensus-common = { path = "../../core/consensus/common" }
|
||||
substrate-client = { path = "../../core/client" }
|
||||
sr-primitives = { path = "../../core/sr-primitives" }
|
||||
parity-codec = "2.1"
|
||||
parity-codec = "2.2"
|
||||
parity-codec-derive = "2.1"
|
||||
substrate-network-libp2p = { path = "../../core/network-libp2p" }
|
||||
tokio = "0.1.11"
|
||||
|
||||
@@ -5,7 +5,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
||||
[dependencies]
|
||||
sr-std = { path = "../sr-std", default-features = false }
|
||||
parity-codec = { version = "2.1", default-features = false }
|
||||
parity-codec = { version = "2.2", default-features = false }
|
||||
parity-codec-derive = { version = "2.1", default-features = false }
|
||||
rustc-hex = { version = "2.0", default-features = false }
|
||||
serde = { version = "1.0", default-features = false }
|
||||
|
||||
@@ -10,7 +10,7 @@ jsonrpc-macros = { git="https://github.com/paritytech/jsonrpc.git" }
|
||||
jsonrpc-pubsub = { git="https://github.com/paritytech/jsonrpc.git" }
|
||||
log = "0.4"
|
||||
parking_lot = "0.7.1"
|
||||
parity-codec = "2.1"
|
||||
parity-codec = "2.2"
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
serde_json = "1.0"
|
||||
|
||||
@@ -24,7 +24,7 @@ substrate-consensus-common = { path = "../../core/consensus/common" }
|
||||
substrate-network = { path = "../../core/network" }
|
||||
substrate-client = { path = "../../core/client" }
|
||||
substrate-client-db = { path = "../../core/client/db" }
|
||||
parity-codec = "2.1"
|
||||
parity-codec = "2.2"
|
||||
substrate-executor = { path = "../../core/executor" }
|
||||
substrate-transaction-pool = { path = "../../core/transaction-pool" }
|
||||
substrate-rpc-servers = { path = "../../core/rpc-servers" }
|
||||
|
||||
@@ -10,7 +10,7 @@ rustc_version = "0.2"
|
||||
[dependencies]
|
||||
sr-std = { path = "../sr-std", default-features = false }
|
||||
substrate-primitives = { path = "../primitives", default-features = false }
|
||||
parity-codec = { version = "2.1", default-features = false }
|
||||
parity-codec = { version = "2.2", default-features = false }
|
||||
hash-db = { git = "https://github.com/paritytech/trie", default-features = false }
|
||||
|
||||
environmental = { version = "~1.0", optional = true }
|
||||
|
||||
@@ -8,7 +8,7 @@ num-traits = { version = "0.2", default-features = false }
|
||||
integer-sqrt = { version = "0.1.2" }
|
||||
serde = { version = "1.0", optional = true }
|
||||
serde_derive = { version = "1.0", optional = true }
|
||||
parity-codec = { version = "2.1", default-features = false }
|
||||
parity-codec = { version = "2.2", default-features = false }
|
||||
parity-codec-derive = { version = "2.1", default-features = false }
|
||||
substrate-primitives = { path = "../primitives", default-features = false }
|
||||
sr-std = { path = "../sr-std", default-features = false }
|
||||
|
||||
@@ -145,6 +145,22 @@ impl From<f32> for Permill {
|
||||
}
|
||||
}
|
||||
|
||||
impl codec::CompactAs for Permill {
|
||||
type As = u32;
|
||||
fn encode_as(&self) -> &u32 {
|
||||
&self.0
|
||||
}
|
||||
fn decode_from(x: u32) -> Permill {
|
||||
Permill(x)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<codec::Compact<Permill>> for Permill {
|
||||
fn from(x: codec::Compact<Permill>) -> Permill {
|
||||
x.0
|
||||
}
|
||||
}
|
||||
|
||||
/// Perbill is parts-per-billion. It stores a value between 0 and 1 in fixed point and
|
||||
/// provides a means to multiply some other value by that.
|
||||
#[cfg_attr(feature = "std", derive(Serialize, Deserialize, Debug))]
|
||||
@@ -200,6 +216,22 @@ impl From<f32> for Perbill {
|
||||
}
|
||||
}
|
||||
|
||||
impl codec::CompactAs for Perbill {
|
||||
type As = u32;
|
||||
fn encode_as(&self) -> &u32 {
|
||||
&self.0
|
||||
}
|
||||
fn decode_from(x: u32) -> Perbill {
|
||||
Perbill(x)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<codec::Compact<Perbill>> for Perbill {
|
||||
fn from(x: codec::Compact<Perbill>) -> Perbill {
|
||||
x.0
|
||||
}
|
||||
}
|
||||
|
||||
/// Ed25519 signature verify.
|
||||
#[derive(Eq, PartialEq, Clone, Default, Encode, Decode)]
|
||||
#[cfg_attr(feature = "std", derive(Debug, Serialize, Deserialize))]
|
||||
@@ -623,4 +655,43 @@ mod tests {
|
||||
let ex = super::OpaqueExtrinsic(vec![1, 2, 3, 4]);
|
||||
assert_eq!(serde_json::to_string(&ex).unwrap(), "\"0x1001020304\"".to_owned());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn compact_permill_perbill_encoding() {
|
||||
let tests = [(0u32, 1usize), (63, 1), (64, 2), (16383, 2), (16384, 4), (1073741823, 4), (1073741824, 5), (u32::max_value(), 5)];
|
||||
for &(n, l) in &tests {
|
||||
let compact: codec::Compact<super::Permill> = super::Permill(n).into();
|
||||
let encoded = compact.encode();
|
||||
assert_eq!(encoded.len(), l);
|
||||
let decoded = <codec::Compact<super::Permill>>::decode(&mut & encoded[..]).unwrap();
|
||||
let permill: super::Permill = decoded.into();
|
||||
assert_eq!(permill, super::Permill(n));
|
||||
|
||||
let compact: codec::Compact<super::Perbill> = super::Perbill(n).into();
|
||||
let encoded = compact.encode();
|
||||
assert_eq!(encoded.len(), l);
|
||||
let decoded = <codec::Compact<super::Perbill>>::decode(&mut & encoded[..]).unwrap();
|
||||
let perbill: super::Perbill = decoded.into();
|
||||
assert_eq!(perbill, super::Perbill(n));
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Encode, Decode, PartialEq, Eq, Debug)]
|
||||
struct WithCompact<T: codec::HasCompact> {
|
||||
data: T,
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_has_compact_permill() {
|
||||
let data = WithCompact { data: super::Permill(1) };
|
||||
let encoded = data.encode();
|
||||
assert_eq!(data, WithCompact::<super::Permill>::decode(&mut &encoded[..]).unwrap());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_has_compact_perbill() {
|
||||
let data = WithCompact { data: super::Perbill(1) };
|
||||
let encoded = data.encode();
|
||||
assert_eq!(data, WithCompact::<super::Perbill>::decode(&mut &encoded[..]).unwrap());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ rustc_version = "0.2"
|
||||
wasmi = { version = "0.4.3", optional = true }
|
||||
substrate-primitives = { path = "../primitives", default-features = false }
|
||||
sr-std = { path = "../sr-std", default-features = false }
|
||||
parity-codec = { version = "2.1", default-features = false }
|
||||
parity-codec = { version = "2.2", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
wabt = "~0.7.4"
|
||||
|
||||
@@ -6,7 +6,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
||||
[dependencies]
|
||||
serde = { version = "1.0", default-features = false }
|
||||
serde_derive = { version = "1.0", optional = true }
|
||||
parity-codec = { version = "2.1", default-features = false }
|
||||
parity-codec = { version = "2.2", default-features = false }
|
||||
parity-codec-derive = { version = "2.1", default-features = false }
|
||||
sr-std = { path = "../sr-std", default-features = false }
|
||||
sr-primitives = { path = "../sr-primitives", default-features = false }
|
||||
|
||||
@@ -7,7 +7,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
||||
parking_lot = "0.7.1"
|
||||
log = "0.4"
|
||||
substrate-primitives = { path = "../../core/primitives" }
|
||||
parity-codec = "2.1"
|
||||
parity-codec = "2.2"
|
||||
parity-codec-derive = "2.1"
|
||||
|
||||
[dev-dependencies]
|
||||
|
||||
@@ -14,4 +14,4 @@ trie-db = { git = "https://github.com/paritytech/trie" }
|
||||
trie-root = { git = "https://github.com/paritytech/trie" }
|
||||
substrate-trie = { path = "../trie" }
|
||||
substrate-primitives = { path = "../primitives" }
|
||||
parity-codec = "2.1"
|
||||
parity-codec = "2.2"
|
||||
|
||||
@@ -5,7 +5,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
||||
|
||||
[dependencies]
|
||||
substrate-client = { path = "../client" }
|
||||
parity-codec = "2.1"
|
||||
parity-codec = "2.2"
|
||||
substrate-executor = { path = "../executor" }
|
||||
substrate-consensus-common = { path = "../consensus/common" }
|
||||
substrate-keyring = { path = "../../core/keyring" }
|
||||
|
||||
@@ -8,7 +8,7 @@ log = { version = "0.4", optional = true }
|
||||
hex-literal = { version = "0.1.0", optional = true }
|
||||
serde = { version = "1.0", optional = true }
|
||||
serde_derive = { version = "1.0", optional = true }
|
||||
parity-codec = { version = "2.1", default-features = false }
|
||||
parity-codec = { version = "2.2", default-features = false }
|
||||
parity-codec-derive = { version = "2.1", default-features = false }
|
||||
substrate-keyring = { path = "../keyring", optional = true }
|
||||
substrate-client = { path = "../client", default-features = false }
|
||||
|
||||
+16
-16
@@ -267,7 +267,7 @@ name = "impl-codec"
|
||||
version = "0.1.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -533,7 +533,7 @@ source = "git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7
|
||||
|
||||
[[package]]
|
||||
name = "parity-codec"
|
||||
version = "2.1.5"
|
||||
version = "2.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
dependencies = [
|
||||
"arrayvec 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -898,7 +898,7 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"environmental 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hash-db 0.9.0 (git+https://github.com/paritytech/trie)",
|
||||
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sr-std 0.1.0",
|
||||
"substrate-primitives 0.1.0",
|
||||
@@ -913,7 +913,7 @@ dependencies = [
|
||||
"integer-sqrt 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"num-traits 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -933,7 +933,7 @@ dependencies = [
|
||||
name = "sr-version"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -945,7 +945,7 @@ dependencies = [
|
||||
name = "srml-metadata"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -960,7 +960,7 @@ dependencies = [
|
||||
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"mashup 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"once_cell 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sr-io 0.1.0",
|
||||
@@ -1022,7 +1022,7 @@ dependencies = [
|
||||
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"kvdb 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"slog 2.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sr-api-macros 0.1.0",
|
||||
@@ -1042,7 +1042,7 @@ dependencies = [
|
||||
name = "substrate-consensus-aura-primitives"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sr-io 0.1.0",
|
||||
"sr-primitives 0.1.0",
|
||||
"sr-version 0.1.0",
|
||||
@@ -1058,7 +1058,7 @@ dependencies = [
|
||||
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"futures 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"sr-primitives 0.1.0",
|
||||
@@ -1075,7 +1075,7 @@ dependencies = [
|
||||
"error-chain 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"lazy_static 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -1108,7 +1108,7 @@ dependencies = [
|
||||
"hash256-std-hasher 0.9.0 (git+https://github.com/paritytech/trie)",
|
||||
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"impl-serde 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"primitive-types 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"ring 0.13.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -1137,7 +1137,7 @@ dependencies = [
|
||||
"heapsize 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parking_lot 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"substrate-primitives 0.1.0",
|
||||
"substrate-trie 0.4.0",
|
||||
@@ -1165,7 +1165,7 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"hex-literal 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"serde_derive 1.0.81 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
@@ -1193,7 +1193,7 @@ version = "0.4.0"
|
||||
dependencies = [
|
||||
"hash-db 0.9.0 (git+https://github.com/paritytech/trie)",
|
||||
"memory-db 0.9.0 (git+https://github.com/paritytech/trie)",
|
||||
"parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"parity-codec 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||
"trie-db 0.9.0 (git+https://github.com/paritytech/trie)",
|
||||
"trie-root 0.9.0 (git+https://github.com/paritytech/trie)",
|
||||
]
|
||||
@@ -1622,7 +1622,7 @@ dependencies = [
|
||||
"checksum openssl-sys 0.9.40 (registry+https://github.com/rust-lang/crates.io-index)" = "1bb974e77de925ef426b6bc82fce15fd45bdcbeb5728bffcfc7cdeeb7ce1c2d6"
|
||||
"checksum owning_ref 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "49a4b8ea2179e6a2e27411d3bca09ca6dd630821cf6894c6c7c8467a8ee7ef13"
|
||||
"checksum parity-bytes 0.1.0 (git+https://github.com/paritytech/parity-common?rev=b0317f649ab2c665b7987b8475878fc4d2e1f81d)" = "<none>"
|
||||
"checksum parity-codec 2.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "dca389ea5e1632c89b2ce54f7e2b4a8a8c9d278042222a91e0bf95451218cb4c"
|
||||
"checksum parity-codec 2.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e7b6a1290fe78aa6bbb5f3338ecede3062687a98b9e40cd1dbcaa47261d44097"
|
||||
"checksum parity-codec-derive 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ffa42c2cb493b60b12c75b26e8c94cb734af4df4d7f2cc229dc04c1953dac189"
|
||||
"checksum parity-wasm 0.31.3 (registry+https://github.com/rust-lang/crates.io-index)" = "511379a8194230c2395d2f5fa627a5a7e108a9f976656ce723ae68fca4097bfc"
|
||||
"checksum parking_lot 0.6.4 (registry+https://github.com/rust-lang/crates.io-index)" = "f0802bff09003b291ba756dc7e79313e51cc31667e94afbe847def490424cde5"
|
||||
|
||||
BIN
Binary file not shown.
@@ -7,7 +7,7 @@ authors = ["Parity Technologies <admin@parity.io>"]
|
||||
error-chain = "0.12"
|
||||
futures = "0.1"
|
||||
log = "0.4"
|
||||
parity-codec = "2.1"
|
||||
parity-codec = "2.2"
|
||||
parking_lot = "0.7.1"
|
||||
sr-primitives = { path = "../sr-primitives" }
|
||||
substrate-client = { path = "../client" }
|
||||
|
||||
@@ -11,7 +11,7 @@ name = "bench"
|
||||
harness = false
|
||||
|
||||
[dependencies]
|
||||
parity-codec = { version = "2.1" }
|
||||
parity-codec = { version = "2.2" }
|
||||
hash-db = { git = "https://github.com/paritytech/trie", default-features = false }
|
||||
trie-db = { git = "https://github.com/paritytech/trie", optional = true }
|
||||
trie-root = { git = "https://github.com/paritytech/trie", default-features = false }
|
||||
|
||||
Reference in New Issue
Block a user