Update parity-scale-codec to 2.0 (#7994)

* update cargo.toml

* use 2.0 in mmmr
This commit is contained in:
Guillaume Thiolliere
2021-01-29 13:22:45 +01:00
committed by GitHub
parent bea4a6524d
commit f48296e9ad
179 changed files with 316 additions and 383 deletions
+3 -3
View File
@@ -14,7 +14,7 @@ readme = "README.md"
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
codec = { package = "parity-scale-codec", version = "1.3.6", default-features = false, features = ["derive"] }
codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ["derive"] }
sp-consensus = { version = "0.8.0", path = "../../primitives/consensus/common" }
derive_more = "0.99.2"
sc-executor = { version = "0.8.0", path = "../executor" }
@@ -24,7 +24,7 @@ futures = "0.3.1"
hash-db = { version = "0.15.2", default-features = false }
sp-blockchain = { version = "2.0.0", path = "../../primitives/blockchain" }
sp-inherents = { version = "2.0.0", default-features = false, path = "../../primitives/inherents" }
kvdb = "0.8.0"
kvdb = "0.9.0"
log = "0.4.8"
parking_lot = "0.11.1"
lazy_static = "1.4.0"
@@ -43,7 +43,7 @@ sp-transaction-pool = { version = "2.0.0", path = "../../primitives/transaction-
prometheus-endpoint = { package = "substrate-prometheus-endpoint", version = "0.8.0", path = "../../utils/prometheus" }
[dev-dependencies]
kvdb-memorydb = "0.8.0"
kvdb-memorydb = "0.9.0"
sp-test-primitives = { version = "2.0.0", path = "../../primitives/test-primitives" }
substrate-test-runtime = { version = "2.0.0", path = "../../test-utils/runtime" }
thiserror = "1.0.21"
@@ -213,7 +213,7 @@ impl<Block: traits::Block> offchain::TransactionPool for TransactionPoolAdapter<
let xt = match Block::Extrinsic::decode(&mut &*data) {
Ok(xt) => xt,
Err(e) => {
log::warn!("Unable to decode extrinsic: {:?}: {}", data, e.what());
log::warn!("Unable to decode extrinsic: {:?}: {}", data, e);
return Err(());
},
};
@@ -18,7 +18,7 @@ prost-build = "0.7"
[dependencies]
async-trait = "0.1"
codec = { package = "parity-scale-codec", default-features = false, version = "1.3.6" }
codec = { package = "parity-scale-codec", default-features = false, version = "2.0.0" }
derive_more = "0.99.2"
either = "1.5.3"
futures = "0.3.9"
+1 -1
View File
@@ -13,7 +13,7 @@ readme = "README.md"
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
codec = { package = "parity-scale-codec", version = "1.3.6" }
codec = { package = "parity-scale-codec", version = "2.0.0" }
futures = "0.3.9"
futures-timer = "3.0.1"
log = "0.4.8"
+1 -1
View File
@@ -23,7 +23,7 @@ sp-core = { version = "2.0.0", path = "../../primitives/core" }
sp-block-builder = { version = "2.0.0", path = "../../primitives/block-builder" }
sp-inherents = { version = "2.0.0", path = "../../primitives/inherents" }
sc-client-api = { version = "2.0.0", path = "../api" }
codec = { package = "parity-scale-codec", version = "1.3.6", features = ["derive"] }
codec = { package = "parity-scale-codec", version = "2.0.0", features = ["derive"] }
[dev-dependencies]
substrate-test-runtime-client = { path = "../../test-utils/runtime/client" }
+1 -1
View File
@@ -22,7 +22,7 @@ serde_json = "1.0.41"
sp-runtime = { version = "2.0.0", path = "../../primitives/runtime" }
sp-chain-spec = { version = "2.0.0", path = "../../primitives/chain-spec" }
sc-telemetry = { version = "2.0.0", path = "../telemetry" }
codec = { package = "parity-scale-codec", version = "1.3.6" }
codec = { package = "parity-scale-codec", version = "2.0.0" }
sc-consensus-babe = { version = "0.8.0-rc6", path = "../consensus/babe" }
sp-consensus-babe = { version = "0.8.0-rc6", path = "../../primitives/consensus/babe" }
sc-consensus-epochs = { version = "0.8.0-rc6", path = "../consensus/epochs" }
+1 -1
View File
@@ -19,7 +19,7 @@ tokio = { version = "0.2.21", features = [ "signal", "rt-core", "rt-threaded", "
futures = "0.3.9"
fdlimit = "0.2.1"
libp2p = "0.34.0"
parity-scale-codec = "1.3.6"
parity-scale-codec = "2.0.0"
hex = "0.4.2"
rand = "0.7.3"
tiny-bip39 = "0.8.0"
+1 -1
View File
@@ -18,7 +18,7 @@ sp-consensus-aura = { version = "0.8.0", path = "../../../primitives/consensus/a
sp-block-builder = { version = "2.0.0", path = "../../../primitives/block-builder" }
sc-block-builder = { version = "0.8.0", path = "../../block-builder" }
sc-client-api = { version = "2.0.0", path = "../../api" }
codec = { package = "parity-scale-codec", version = "1.3.6" }
codec = { package = "parity-scale-codec", version = "2.0.0" }
sp-consensus = { version = "0.8.0", path = "../../../primitives/consensus/common" }
sp-consensus-slots = { version = "0.8.0", path = "../../../primitives/consensus/slots" }
derive_more = "0.99.2"
+1 -1
View File
@@ -14,7 +14,7 @@ readme = "README.md"
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
codec = { package = "parity-scale-codec", version = "1.3.6", features = ["derive"] }
codec = { package = "parity-scale-codec", version = "2.0.0", features = ["derive"] }
sp-consensus-babe = { version = "0.8.0", path = "../../../primitives/consensus/babe" }
sp-core = { version = "2.0.0", path = "../../../primitives/core" }
sp-application-crypto = { version = "2.0.0", path = "../../../primitives/application-crypto" }
@@ -44,7 +44,7 @@ fn load_decode<B, T>(backend: &B, key: &[u8]) -> ClientResult<Option<T>>
T: Decode,
{
let corrupt = |e: codec::Error| {
ClientError::Backend(format!("BABE DB is corrupted. Decode error: {}", e.what()))
ClientError::Backend(format!("BABE DB is corrupted. Decode error: {}", e))
};
match backend.get_aux(key)? {
None => Ok(None),
+1 -1
View File
@@ -13,7 +13,7 @@ readme = "README.md"
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
codec = { package = "parity-scale-codec", version = "1.3.6", features = ["derive"] }
codec = { package = "parity-scale-codec", version = "2.0.0", features = ["derive"] }
parking_lot = "0.11.1"
fork-tree = { version = "2.0.0", path = "../../../utils/fork-tree" }
sp-runtime = { path = "../../../primitives/runtime" , version = "2.0.0"}
@@ -20,7 +20,7 @@ jsonrpc-core-client = "15.1.0"
jsonrpc-derive = "15.1.0"
log = "0.4.8"
parking_lot = "0.11.1"
codec = { package = "parity-scale-codec", version = "1.3.6" }
codec = { package = "parity-scale-codec", version = "2.0.0" }
serde = { version = "1.0", features=["derive"] }
assert_matches = "1.3.0"
+1 -1
View File
@@ -13,7 +13,7 @@ readme = "README.md"
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
codec = { package = "parity-scale-codec", version = "1.3.6", features = ["derive"] }
codec = { package = "parity-scale-codec", version = "2.0.0", features = ["derive"] }
sp-core = { version = "2.0.0", path = "../../../primitives/core" }
sp-blockchain = { version = "2.0.0", path = "../../../primitives/blockchain" }
sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" }
+1 -1
View File
@@ -14,7 +14,7 @@ readme = "README.md"
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
codec = { package = "parity-scale-codec", version = "1.3.6" }
codec = { package = "parity-scale-codec", version = "2.0.0" }
sc-client-api = { version = "2.0.0", path = "../../api" }
sp-core = { version = "2.0.0", path = "../../../primitives/core" }
sp-trie = { version = "2.0.0", path = "../../../primitives/trie" }
@@ -41,7 +41,7 @@ fn load_decode<C, T>(backend: &C, key: &[u8]) -> ClientResult<Option<T>>
None => Ok(None),
Some(t) => T::decode(&mut &t[..])
.map_err(
|e| ClientError::Backend(format!("Slots DB is corrupted. Decode error: {}", e.what())),
|e| ClientError::Backend(format!("Slots DB is corrupted. Decode error: {}", e)),
)
.map(Some)
}
+6 -6
View File
@@ -15,13 +15,13 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
parking_lot = "0.11.1"
log = "0.4.8"
kvdb = "0.8.0"
kvdb-rocksdb = { version = "0.10.0", optional = true }
kvdb-memorydb = "0.8.0"
kvdb = "0.9.0"
kvdb-rocksdb = { version = "0.11.0", optional = true }
kvdb-memorydb = "0.9.0"
linked-hash-map = "0.5.2"
hash-db = "0.15.2"
parity-util-mem = { version = "0.8.0", default-features = false, features = ["std"] }
codec = { package = "parity-scale-codec", version = "1.3.6", features = ["derive"] }
parity-util-mem = { version = "0.9.0", default-features = false, features = ["std"] }
codec = { package = "parity-scale-codec", version = "2.0.0", features = ["derive"] }
blake2-rfc = "0.2.18"
sc-client-api = { version = "2.0.0", path = "../api" }
@@ -43,7 +43,7 @@ sp-keyring = { version = "2.0.0", path = "../../primitives/keyring" }
sp-tracing = { version = "2.0.0", path = "../../primitives/tracing" }
substrate-test-runtime-client = { version = "2.0.0", path = "../../test-utils/runtime/client" }
quickcheck = "0.9"
kvdb-rocksdb = "0.10.0"
kvdb-rocksdb = "0.11.0"
tempfile = "3"
[features]
+1 -1
View File
@@ -15,7 +15,7 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
derive_more = "0.99.2"
codec = { package = "parity-scale-codec", version = "1.3.6" }
codec = { package = "parity-scale-codec", version = "2.0.0" }
sp-io = { version = "2.0.0", path = "../../primitives/io" }
sp-core = { version = "2.0.0", path = "../../primitives/core" }
sp-tasks = { version = "2.0.0", path = "../../primitives/tasks" }
+1 -1
View File
@@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
derive_more = "0.99.2"
parity-wasm = "0.41.0"
codec = { package = "parity-scale-codec", version = "1.3.6" }
codec = { package = "parity-scale-codec", version = "2.0.0" }
wasmi = "0.6.2"
sp-core = { version = "2.0.0", path = "../../../primitives/core" }
sp-allocator = { version = "2.0.0", path = "../../../primitives/allocator" }
+1 -1
View File
@@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
log = "0.4.8"
wasmi = "0.6.2"
codec = { package = "parity-scale-codec", version = "1.3.6" }
codec = { package = "parity-scale-codec", version = "2.0.0" }
sc-executor-common = { version = "0.8.0", path = "../common" }
sp-wasm-interface = { version = "2.0.0", path = "../../../primitives/wasm-interface" }
sp-runtime-interface = { version = "2.0.0", path = "../../../primitives/runtime-interface" }
@@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"]
log = "0.4.8"
scoped-tls = "1.0"
parity-wasm = "0.41.0"
codec = { package = "parity-scale-codec", version = "1.3.6" }
codec = { package = "parity-scale-codec", version = "2.0.0" }
sc-executor-common = { version = "0.8.0", path = "../common" }
sp-wasm-interface = { version = "2.0.0", path = "../../../primitives/wasm-interface" }
sp-runtime-interface = { version = "2.0.0", path = "../../../primitives/runtime-interface" }
@@ -22,7 +22,7 @@ sc-service = { version = "0.8.0", path = "../service" }
futures = "0.3.8"
log = "0.4.11"
derive_more = "0.99.11"
codec = { package = "parity-scale-codec", version = "1.3.5" }
codec = { package = "parity-scale-codec", version = "2.0.0" }
prost = "0.6.1"
num-traits = "0.2.14"
parking_lot = "0.11.1"
+3 -3
View File
@@ -22,7 +22,7 @@ futures-timer = "3.0.1"
log = "0.4.8"
parking_lot = "0.11.1"
rand = "0.7.2"
parity-scale-codec = { version = "1.3.6", features = ["derive"] }
parity-scale-codec = { version = "2.0.0", features = ["derive"] }
sp-application-crypto = { version = "2.0.0", path = "../../primitives/application-crypto" }
sp-arithmetic = { version = "2.0.0", path = "../../primitives/arithmetic" }
sp-runtime = { version = "2.0.0", path = "../../primitives/runtime" }
@@ -43,13 +43,13 @@ sc-network-gossip = { version = "0.8.0", path = "../network-gossip" }
sp-finality-grandpa = { version = "2.0.0", path = "../../primitives/finality-grandpa" }
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../utils/prometheus", version = "0.8.0"}
sc-block-builder = { version = "0.8.0", path = "../block-builder" }
finality-grandpa = { version = "0.12.3", features = ["derive-codec"] }
finality-grandpa = { version = "0.13.0", features = ["derive-codec"] }
pin-project = "0.4.6"
linked-hash-map = "0.5.2"
[dev-dependencies]
assert_matches = "1.3.0"
finality-grandpa = { version = "0.12.3", features = ["derive-codec", "test-helpers"] }
finality-grandpa = { version = "0.13.0", features = ["derive-codec", "test-helpers"] }
sc-network = { version = "0.8.0", path = "../network" }
sc-network-test = { version = "0.8.0", path = "../network/test" }
sp-keyring = { version = "2.0.0", path = "../../primitives/keyring" }
@@ -14,7 +14,7 @@ sc-rpc = { version = "2.0.0", path = "../../rpc" }
sp-blockchain = { version = "2.0.0", path = "../../../primitives/blockchain" }
sp-core = { version = "2.0.0", path = "../../../primitives/core" }
sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" }
finality-grandpa = { version = "0.12.3", features = ["derive-codec"] }
finality-grandpa = { version = "0.13.0", features = ["derive-codec"] }
jsonrpc-core = "15.1.0"
jsonrpc-core-client = "15.1.0"
jsonrpc-derive = "15.1.0"
@@ -24,7 +24,7 @@ serde = { version = "1.0.105", features = ["derive"] }
serde_json = "1.0.50"
log = "0.4.8"
derive_more = "0.99.2"
parity-scale-codec = { version = "1.3.6", features = ["derive"] }
parity-scale-codec = { version = "2.0.0", features = ["derive"] }
sc-client-api = { version = "2.0.0", path = "../../api" }
[dev-dependencies]
@@ -143,7 +143,7 @@ pub(crate) fn load_decode<B: AuxStore, T: Decode>(
match backend.get_aux(key)? {
None => Ok(None),
Some(t) => T::decode(&mut &t[..])
.map_err(|e| ClientError::Backend(format!("GRANDPA DB is corrupted: {}", e.what())))
.map_err(|e| ClientError::Backend(format!("GRANDPA DB is corrupted: {}", e)))
.map(Some)
}
}
@@ -370,7 +370,7 @@ pub(super) struct NeighborPacket<N> {
/// A versioned neighbor packet.
#[derive(Debug, Encode, Decode)]
pub(super) enum VersionedNeighborPacket<N> {
#[codec(index = "1")]
#[codec(index = 1)]
V1(NeighborPacket<N>),
}
@@ -1415,7 +1415,7 @@ impl<Block: BlockT> GossipValidator<Block> {
}
Err(e) => {
message_name = None;
debug!(target: "afg", "Error decoding message: {}", e.what());
debug!(target: "afg", "Error decoding message: {}", e);
telemetry!(CONSENSUS_DEBUG; "afg.err_decoding_msg"; "" => "");
let len = std::cmp::min(i32::max_value() as usize, data.len()) as i32;
+1 -1
View File
@@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"]
ansi_term = "0.12.1"
futures = "0.3.9"
log = "0.4.8"
parity-util-mem = { version = "0.8.0", default-features = false, features = ["primitive-types"] }
parity-util-mem = { version = "0.9.0", default-features = false, features = ["primitive-types"] }
sc-client-api = { version = "2.0.0", path = "../api" }
sc-network = { version = "0.8.0", path = "../network" }
sp-blockchain = { version = "2.0.0", path = "../../primitives/blockchain" }
+1 -1
View File
@@ -21,7 +21,7 @@ sp-core = { version = "2.0.0", path = "../../primitives/core" }
sp-state-machine = { version = "0.8.0", path = "../../primitives/state-machine" }
sc-client-api = { version = "2.0.0", path = "../api" }
sp-api = { version = "2.0.0", path = "../../primitives/api" }
codec = { package = "parity-scale-codec", version = "1.3.6" }
codec = { package = "parity-scale-codec", version = "2.0.0" }
sc-executor = { version = "0.8.0", path = "../executor" }
[features]
+1 -1
View File
@@ -22,7 +22,7 @@ async-std = "1.6.5"
bitflags = "1.2.0"
bs58 = "0.4.0"
bytes = "1"
codec = { package = "parity-scale-codec", version = "1.3.6", features = ["derive"] }
codec = { package = "parity-scale-codec", version = "2.0.0", features = ["derive"] }
derive_more = "0.99.2"
either = "1.5.3"
erased-serde = "0.3.9"
+2 -2
View File
@@ -656,7 +656,7 @@ impl<B: BlockT, H: ExHashT> Protocol<B, H> {
"Couldn't decode packet sent by {}: {:?}: {}",
who,
data,
err.what(),
err,
);
self.peerset_handle.report_peer(who, rep::BAD_MESSAGE);
return CustomMessageOutcome::None;
@@ -1737,7 +1737,7 @@ impl<B: BlockT, H: ExHashT> NetworkBehaviour for Protocol<B, H> {
"Couldn't decode handshake sent by {}: {:?}: {} & {}",
peer_id,
received_handshake,
err.what(),
err,
err2,
);
self.peerset_handle.report_peer(peer_id, rep::BAD_MESSAGE);
@@ -95,7 +95,7 @@ impl BlockAttributes {
}
impl Encode for BlockAttributes {
fn encode_to<T: Output>(&self, dest: &mut T) {
fn encode_to<T: Output + ?Sized>(&self, dest: &mut T) {
dest.push_byte(self.bits())
}
}
@@ -198,7 +198,7 @@ pub mod generic {
}
impl codec::Encode for Roles {
fn encode_to<T: codec::Output>(&self, dest: &mut T) {
fn encode_to<T: codec::Output + ?Sized>(&self, dest: &mut T) {
dest.push_byte(self.bits())
}
}
@@ -282,7 +282,7 @@ pub mod generic {
/// Batch of consensus protocol messages.
// NOTE: index is incremented by 2 due to finality proof related
// messages that were removed.
#[codec(index = "17")]
#[codec(index = 17)]
ConsensusBatch(Vec<ConsensusMessage>),
}
@@ -402,7 +402,7 @@ pub mod generic {
// This assumes that the packet contains nothing but the announcement message.
// TODO: Get rid of it once protocol v4 is common.
impl<H: Encode> Encode for BlockAnnounce<H> {
fn encode_to<T: Output>(&self, dest: &mut T) {
fn encode_to<T: Output + ?Sized>(&self, dest: &mut T) {
self.header.encode_to(dest);
if let Some(state) = &self.state {
state.encode_to(dest);
+1 -1
View File
@@ -23,7 +23,7 @@ log = "0.4.8"
threadpool = "1.7"
num_cpus = "1.10"
sp-offchain = { version = "2.0.0", path = "../../primitives/offchain" }
codec = { package = "parity-scale-codec", version = "1.3.6", features = ["derive"] }
codec = { package = "parity-scale-codec", version = "2.0.0", features = ["derive"] }
parking_lot = "0.11.1"
sp-core = { version = "2.0.0", path = "../../primitives/core" }
rand = "0.7.2"
+1 -1
View File
@@ -13,7 +13,7 @@ readme = "README.md"
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
codec = { package = "parity-scale-codec", version = "1.3.6" }
codec = { package = "parity-scale-codec", version = "2.0.0" }
derive_more = "0.99.2"
futures = { version = "0.3.1", features = ["compat"] }
jsonrpc-core = "15.1.0"
+1 -1
View File
@@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"]
sc-rpc-api = { version = "0.8.0", path = "../rpc-api" }
sc-client-api = { version = "2.0.0", path = "../api" }
sp-api = { version = "2.0.0", path = "../../primitives/api" }
codec = { package = "parity-scale-codec", version = "1.3.6" }
codec = { package = "parity-scale-codec", version = "2.0.0" }
futures = { version = "0.3.1", features = ["compat"] }
jsonrpc-pubsub = "15.1.0"
log = "0.4.8"
@@ -590,7 +590,7 @@ fn runtime_version<Block: BlockT, F: Fetcher<Block>>(
)
.then(|version| ready(version.and_then(|version|
Decode::decode(&mut &version.0[..])
.map_err(|e| client_err(ClientError::VersionInvalid(e.what().into())))
.map_err(|e| client_err(ClientError::VersionInvalid(e.to_string())))
)))
}
+2 -2
View File
@@ -61,7 +61,7 @@ sc-light = { version = "2.0.0", path = "../light" }
sc-client-api = { version = "2.0.0", path = "../api" }
sp-api = { version = "2.0.0", path = "../../primitives/api" }
sc-client-db = { version = "0.8.0", default-features = false, path = "../db" }
codec = { package = "parity-scale-codec", version = "1.3.6" }
codec = { package = "parity-scale-codec", version = "2.0.0" }
sc-executor = { version = "0.8.0", path = "../executor" }
sc-transaction-pool = { version = "2.0.0", path = "../transaction-pool" }
sp-transaction-pool = { version = "2.0.0", path = "../../primitives/transaction-pool" }
@@ -77,7 +77,7 @@ sc-tracing = { version = "2.0.0", path = "../tracing" }
sp-tracing = { version = "2.0.0", path = "../../primitives/tracing" }
tracing = "0.1.22"
tracing-futures = { version = "0.2.4" }
parity-util-mem = { version = "0.8.0", default-features = false, features = ["primitive-types"] }
parity-util-mem = { version = "0.9.0", default-features = false, features = ["primitive-types"] }
[target.'cfg(not(target_os = "unknown"))'.dependencies]
tempfile = "3.1.0"
+1 -1
View File
@@ -40,5 +40,5 @@ sc-client-api = { version = "2.0.0", path = "../../api" }
sc-block-builder = { version = "0.8.0", path = "../../block-builder" }
sc-executor = { version = "0.8.0", path = "../../executor" }
sp-panic-handler = { version = "2.0.0", path = "../../../primitives/panic-handler" }
parity-scale-codec = "1.3.6"
parity-scale-codec = "2.0.0"
sp-tracing = { version = "2.0.0", path = "../../../primitives/tracing" }
+2 -2
View File
@@ -18,6 +18,6 @@ parking_lot = "0.11.1"
log = "0.4.11"
sc-client-api = { version = "2.0.0", path = "../api" }
sp-core = { version = "2.0.0", path = "../../primitives/core" }
codec = { package = "parity-scale-codec", version = "1.3.6", features = ["derive"] }
parity-util-mem = { version = "0.8.0", default-features = false, features = ["primitive-types"] }
codec = { package = "parity-scale-codec", version = "2.0.0", features = ["derive"] }
parity-util-mem = { version = "0.9.0", default-features = false, features = ["primitive-types"] }
parity-util-mem-derive = "0.1.0"
+1 -1
View File
@@ -107,7 +107,7 @@ impl<E: fmt::Debug> fmt::Debug for Error<E> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
Error::Db(e) => e.fmt(f),
Error::Decoding(e) => write!(f, "Error decoding sliceable value: {}", e.what()),
Error::Decoding(e) => write!(f, "Error decoding sliceable value: {}", e),
Error::InvalidBlock => write!(f, "Trying to canonicalize invalid block"),
Error::InvalidBlockNumber => write!(f, "Trying to insert block with invalid number"),
Error::InvalidParent => write!(f, "Trying to insert block with unknown parent"),
+2 -2
View File
@@ -13,13 +13,13 @@ readme = "README.md"
targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
codec = { package = "parity-scale-codec", version = "1.3.6" }
codec = { package = "parity-scale-codec", version = "2.0.0" }
thiserror = "1.0.21"
futures = { version = "0.3.1", features = ["compat"] }
futures-diagnose = "1.0"
intervalier = "0.4.0"
log = "0.4.8"
parity-util-mem = { version = "0.8.0", default-features = false, features = ["primitive-types"] }
parity-util-mem = { version = "0.9.0", default-features = false, features = ["primitive-types"] }
parking_lot = "0.11.1"
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../utils/prometheus", version = "0.8.0"}
sc-client-api = { version = "2.0.0", path = "../api" }
@@ -25,13 +25,13 @@ sp-utils = { version = "2.0.0", path = "../../../primitives/utils" }
sp-core = { version = "2.0.0", path = "../../../primitives/core" }
sp-runtime = { version = "2.0.0", path = "../../../primitives/runtime" }
sp-transaction-pool = { version = "2.0.0", path = "../../../primitives/transaction-pool" }
parity-util-mem = { version = "0.8.0", default-features = false, features = ["primitive-types"] }
parity-util-mem = { version = "0.9.0", default-features = false, features = ["primitive-types"] }
linked-hash-map = "0.5.2"
retain_mut = "0.1.2"
[dev-dependencies]
assert_matches = "1.3.0"
codec = { package = "parity-scale-codec", version = "1.3.6" }
codec = { package = "parity-scale-codec", version = "2.0.0" }
substrate-test-runtime = { version = "2.0.0", path = "../../../test-utils/runtime" }
criterion = "0.3"