Use MaxEncodedLen trait from new parity-scale-codec v2.2 (#3412)

* Use MaxEncodedLen trait from new parity-scale-codec v2.2

* update Substrate

Co-authored-by: parity-processbot <>
This commit is contained in:
Igor Matuszewski
2021-07-05 23:11:03 +02:00
committed by GitHub
parent e80475ce4e
commit 037f22342b
11 changed files with 166 additions and 213 deletions
+1 -4
View File
@@ -7,7 +7,7 @@ build = "build.rs"
[dependencies]
bitvec = { version = "0.20.1", default-features = false, features = ["alloc"] }
parity-scale-codec = { version = "2.0.0", default-features = false, features = ["derive"] }
parity-scale-codec = { version = "2.2.0", default-features = false, features = ["derive", "max-encoded-len"] }
log = { version = "0.4.14", default-features = false }
rustc-hex = { version = "2.1.0", default-features = false }
serde = { version = "1.0.123", default-features = false }
@@ -86,8 +86,6 @@ xcm = { package = "xcm", path = "../../xcm", default-features = false }
xcm-executor = { package = "xcm-executor", path = "../../xcm/xcm-executor", default-features = false }
xcm-builder = { package = "xcm-builder", path = "../../xcm/xcm-builder", default-features = false }
max-encoded-len = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
[dev-dependencies]
hex-literal = "0.3.1"
libsecp256k1 = "0.3.5"
@@ -169,7 +167,6 @@ std = [
"xcm/std",
"xcm-executor/std",
"xcm-builder/std",
"max-encoded-len/std",
"frame-election-provider-support/std",
]
runtime-benchmarks = [
+2 -2
View File
@@ -23,7 +23,7 @@
use pallet_transaction_payment::CurrencyAdapter;
use sp_std::prelude::*;
use sp_std::collections::btree_map::BTreeMap;
use parity_scale_codec::{Encode, Decode};
use parity_scale_codec::{Encode, Decode, MaxEncodedLen};
use primitives::v1::{
AccountId, AccountIndex, Balance, BlockNumber, CandidateEvent, CommittedCandidateReceipt,
CoreState, GroupRotationInfo, Hash, Id as ParaId, Moment, Nonce, OccupiedCoreAssumption,
@@ -83,7 +83,7 @@ use sp_core::OpaqueMetadata;
use sp_staking::SessionIndex;
use frame_support::{
parameter_types, construct_runtime, RuntimeDebug, PalletId,
traits::{KeyOwnerProofSystem, Filter, InstanceFilter, All, MaxEncodedLen},
traits::{KeyOwnerProofSystem, Filter, InstanceFilter, All},
weights::Weight,
};
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;