From dc7c6dae4c3a1ba275c9096f95bfd049af6fd51f Mon Sep 17 00:00:00 2001 From: Bryan Chen Date: Mon, 12 Apr 2021 13:44:14 +1200 Subject: [PATCH 1/2] fix missing features --- authority/Cargo.toml | 2 ++ tokens/Cargo.toml | 4 ++++ tokens/src/mock.rs | 2 +- vesting/Cargo.toml | 4 ++++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/authority/Cargo.toml b/authority/Cargo.toml index f124a7d20..ecd262d0d 100644 --- a/authority/Cargo.toml +++ b/authority/Cargo.toml @@ -38,4 +38,6 @@ std = [ "orml-traits/std", ] runtime-benchmarks = [ + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", ] diff --git a/tokens/Cargo.toml b/tokens/Cargo.toml index ddb39ec31..735420dd3 100644 --- a/tokens/Cargo.toml +++ b/tokens/Cargo.toml @@ -35,3 +35,7 @@ std = [ "frame-system/std", "orml-traits/std", ] +runtime-benchmarks = [ + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", +] diff --git a/tokens/src/mock.rs b/tokens/src/mock.rs index 607693940..8566bcf9b 100644 --- a/tokens/src/mock.rs +++ b/tokens/src/mock.rs @@ -76,7 +76,7 @@ impl Contains for TenToFourteen { fn add(new: &AccountId) { TEN_TO_FOURTEEN.with(|v| { let mut members = v.borrow_mut(); - members.push(*new); + members.push(new.clone()); members.sort(); }) } diff --git a/vesting/Cargo.toml b/vesting/Cargo.toml index 9f0cd14d8..064519e91 100644 --- a/vesting/Cargo.toml +++ b/vesting/Cargo.toml @@ -34,3 +34,7 @@ std = [ "frame-support/std", "frame-system/std", ] +runtime-benchmarks = [ + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", +] From a8e27e7ebfa9cde2e53b6c2fdf7b2997f029122b Mon Sep 17 00:00:00 2001 From: Bryan Chen Date: Mon, 12 Apr 2021 14:03:01 +1200 Subject: [PATCH 2/2] test with benchmarks --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9b45dce09..0583cd27d 100644 --- a/Makefile +++ b/Makefile @@ -46,4 +46,4 @@ dev-check-tests: Cargo.toml cargo check --tests --all dev-test: Cargo.toml - cargo test --all + cargo test --all --features runtime-benchmarks