Skip to content

Commit a4ad8b8

Browse files
committed
Review comments
1 parent d068600 commit a4ad8b8

File tree

2 files changed

+10
-30
lines changed

2 files changed

+10
-30
lines changed

polkadot/node/service/src/benchmarking.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ impl frame_benchmarking_cli::ExtrinsicBuilder for RemarkBuilder {
104104
}
105105

106106
fn build(&self, nonce: u32) -> std::result::Result<OpaqueExtrinsic, &'static str> {
107+
// We apply the extrinsic directly, so let's take some random period.
107108
let period = 128;
108109
let genesis = self.client.usage_info().chain.best_hash;
109110
let signer = Sr25519Keyring::Bob.pair();
@@ -152,6 +153,7 @@ impl frame_benchmarking_cli::ExtrinsicBuilder for TransferKeepAliveBuilder {
152153

153154
fn build(&self, nonce: u32) -> std::result::Result<OpaqueExtrinsic, &'static str> {
154155
let signer = Sr25519Keyring::Bob.pair();
156+
// We apply the extrinsic directly, so let's take some random period.
155157
let period = 128;
156158
let genesis = self.client.usage_info().chain.best_hash;
157159
let current_block = 0;

polkadot/node/service/src/chain_spec.rs

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,7 @@
1919
use beefy_primitives::ecdsa_crypto::AuthorityId as BeefyId;
2020
use grandpa::AuthorityId as GrandpaId;
2121
use pallet_im_online::sr25519::AuthorityId as ImOnlineId;
22-
#[cfg(any(
23-
feature = "westend-native",
24-
))]
22+
#[cfg(feature = "westend-native")]
2523
use pallet_staking::Forcing;
2624
use polkadot_primitives::{AccountId, AccountPublic, AssignmentId, ValidatorId};
2725
use sp_authority_discovery::AuthorityId as AuthorityDiscoveryId;
@@ -32,22 +30,14 @@ use rococo_runtime as rococo;
3230
#[cfg(feature = "rococo-native")]
3331
use rococo_runtime_constants::currency::UNITS as ROC;
3432
use sc_chain_spec::ChainSpecExtension;
35-
#[cfg(any(
36-
feature = "westend-native",
37-
feature = "rococo-native"
38-
))]
33+
#[cfg(any(feature = "westend-native", feature = "rococo-native"))]
3934
use sc_chain_spec::ChainType;
4035
use serde::{Deserialize, Serialize};
4136
use sp_core::{sr25519, Pair, Public};
4237
use sp_runtime::traits::IdentifyAccount;
43-
#[cfg(any(
44-
feature = "westend-native",
45-
))]
38+
#[cfg(feature = "westend-native")]
4639
use sp_runtime::Perbill;
47-
#[cfg(any(
48-
feature = "westend-native",
49-
feature = "rococo-native"
50-
))]
40+
#[cfg(any(feature = "westend-native", feature = "rococo-native"))]
5141
use telemetry::TelemetryEndpoints;
5242
#[cfg(feature = "westend-native")]
5343
use westend_runtime as westend;
@@ -60,10 +50,7 @@ const WESTEND_STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/
6050
const ROCOCO_STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/";
6151
#[cfg(feature = "rococo-native")]
6252
const VERSI_STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/";
63-
#[cfg(any(
64-
feature = "westend-native",
65-
feature = "rococo-native"
66-
))]
53+
#[cfg(any(feature = "westend-native", feature = "rococo-native"))]
6754
const DEFAULT_PROTOCOL_ID: &str = "dot";
6855

6956
/// Node `ChainSpec` extensions.
@@ -155,10 +142,7 @@ pub fn wococo_config() -> Result<RococoChainSpec, String> {
155142
}
156143

157144
/// The default parachains host configuration.
158-
#[cfg(any(
159-
feature = "rococo-native",
160-
feature = "westend-native",
161-
))]
145+
#[cfg(any(feature = "rococo-native", feature = "westend-native",))]
162146
fn default_parachains_host_configuration(
163147
) -> polkadot_runtime_parachains::configuration::HostConfiguration<polkadot_primitives::BlockNumber>
164148
{
@@ -197,10 +181,7 @@ fn default_parachains_host_configuration(
197181
}
198182
}
199183

200-
#[cfg(any(
201-
feature = "rococo-native",
202-
feature = "westend-native",
203-
))]
184+
#[cfg(any(feature = "rococo-native", feature = "westend-native",))]
204185
#[test]
205186
fn default_parachains_host_configuration_is_consistent() {
206187
default_parachains_host_configuration().panic_if_not_consistent();
@@ -927,10 +908,7 @@ pub fn get_authority_keys_from_seed_no_beefy(
927908
)
928909
}
929910

930-
#[cfg(any(
931-
feature = "westend-native",
932-
feature = "rococo-native"
933-
))]
911+
#[cfg(any(feature = "westend-native", feature = "rococo-native"))]
934912
fn testnet_accounts() -> Vec<AccountId> {
935913
vec![
936914
get_account_id_from_seed::<sr25519::Public>("Alice"),

0 commit comments

Comments
 (0)