From 05ff32d55cc8f548cb955bfe56ca1b614635eeaa Mon Sep 17 00:00:00 2001 From: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com> Date: Thu, 14 Dec 2023 11:05:28 +0100 Subject: [PATCH] test-runtime: dev --- substrate/test-utils/runtime/Cargo.toml | 1 - substrate/test-utils/runtime/src/lib.rs | 15 +++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/substrate/test-utils/runtime/Cargo.toml b/substrate/test-utils/runtime/Cargo.toml index 29d78f04e9b..f8c4850a4e5 100644 --- a/substrate/test-utils/runtime/Cargo.toml +++ b/substrate/test-utils/runtime/Cargo.toml @@ -99,7 +99,6 @@ std = [ "sp-genesis-builder/std", "sp-inherents/std", "sp-io/std", - "sp-keyring", "sp-offchain/std", "sp-runtime/std", "sp-session/std", diff --git a/substrate/test-utils/runtime/src/lib.rs b/substrate/test-utils/runtime/src/lib.rs index 8ad7dae1755..7992074f118 100644 --- a/substrate/test-utils/runtime/src/lib.rs +++ b/substrate/test-utils/runtime/src/lib.rs @@ -472,7 +472,9 @@ pub const TEST_RUNTIME_BABE_EPOCH_CONFIGURATION: BabeEpochConfiguration = BabeEp use hex_literal::hex; use serde_json::json; +use sp_application_crypto::Ss58Codec; use sp_core::crypto::UncheckedInto; +use sp_keyring::AccountKeyring; fn substrate_test_genesis_config_patch() -> serde_json::Value { let endowed_accounts: sp_std::vec::Vec<AccountId> = vec![ // 5DwBmEFPXRESyEam5SsQF1zbWSCn2kCjyLW51hJHXe9vW4xs @@ -484,6 +486,7 @@ fn substrate_test_genesis_config_patch() -> serde_json::Value { //5FPMzsezo1PRxYbVpJMWK7HNbR2kUxidsAAxH4BosHa4wd6S hex!["92ef83665b39d7a565e11bf8d18d41d45a8011601c339e57a8ea88c8ff7bba6f"].unchecked_into(), ]; + log::info!("xxx: {} {}", file!(), line!()); let patch = json!({ "balances": { @@ -498,12 +501,12 @@ fn substrate_test_genesis_config_patch() -> serde_json::Value { "allowed_slots": "PrimaryAndSecondaryPlainSlots" } }, - // "substrateTest": { - // "authorities": [ - // AccountKeyring::Ferdie.public().to_ss58check(), - // AccountKeyring::Alice.public().to_ss58check() - // ], - // } + "substrateTest": { + "authorities": [ + AccountKeyring::Ferdie.public().to_ss58check(), + AccountKeyring::Alice.public().to_ss58check() + ], + } }); patch } -- GitLab