From 0badd210cfde30f5816e15b8c809dc36ef7dc38f Mon Sep 17 00:00:00 2001 From: Svyatoslav Nikolsky Date: Mon, 27 Mar 2023 11:20:32 +0300 Subject: [PATCH] Rust cargo doc for all features (#1995) * run rustfix rustdoc in grandpa pallet benchmarks * enable rustdoc for all features * fix rialto parachain runtime compilation --- bridges/bin/rialto-parachain/runtime/Cargo.toml | 4 +++- bridges/bin/rialto/node/Cargo.toml | 1 + bridges/modules/grandpa/src/benchmarking.rs | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/bridges/bin/rialto-parachain/runtime/Cargo.toml b/bridges/bin/rialto-parachain/runtime/Cargo.toml index ed193b4e6815..0018c8f3905a 100644 --- a/bridges/bin/rialto-parachain/runtime/Cargo.toml +++ b/bridges/bin/rialto-parachain/runtime/Cargo.toml @@ -83,10 +83,12 @@ runtime-benchmarks = [ 'sp-runtime/runtime-benchmarks', 'frame-benchmarking', 'frame-support/runtime-benchmarks', - 'frame-system-benchmarking', + 'frame-system-benchmarking/runtime-benchmarks', 'frame-system/runtime-benchmarks', 'pallet-balances/runtime-benchmarks', 'pallet-timestamp/runtime-benchmarks', + 'pallet-xcm/runtime-benchmarks', + 'xcm-builder/runtime-benchmarks', ] std = [ "bp-messages/std", diff --git a/bridges/bin/rialto/node/Cargo.toml b/bridges/bin/rialto/node/Cargo.toml index 859a62f22abb..bc8841c4f879 100644 --- a/bridges/bin/rialto/node/Cargo.toml +++ b/bridges/bin/rialto/node/Cargo.toml @@ -45,5 +45,6 @@ frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", bran [features] default = [] runtime-benchmarks = [ + "polkadot-service/runtime-benchmarks", "rialto-runtime/runtime-benchmarks", ] diff --git a/bridges/modules/grandpa/src/benchmarking.rs b/bridges/modules/grandpa/src/benchmarking.rs index 5b9faea2a996..78c7fc362a28 100644 --- a/bridges/modules/grandpa/src/benchmarking.rs +++ b/bridges/modules/grandpa/src/benchmarking.rs @@ -30,8 +30,8 @@ //! //! Consider the following: //! -//! / [B'] <- [C'] -//! [A] <- [B] <- [C] +//! / B <- C' +//! A <- B <- C //! //! The common ancestor of both forks is block A, so this is what GRANDPA will finalize. In order to //! verify this we will have vote ancestries of `[B, C, B', C']` and pre-commits `[C, C']`.