Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

ChainSpec trait #5185

Merged
merged 6 commits into from
Mar 11, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge branch 'master' of github.com:paritytech/substrate into a-dyn-spec
  • Loading branch information
arkpar committed Mar 11, 2020
commit 3c0e174fb611dcd559b599a24f6d9f6d97660250
6 changes: 2 additions & 4 deletions utils/browser/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@ pub use console_log::init_with_level as init_console_log;
/// Create a service configuration from a chain spec.
///
/// This configuration contains good defaults for a browser light client.
pub async fn browser_configuration<G, E>(
transport: Transport,
chain_spec: GenericChainSpec<G, E>,
) -> Result<Configuration, Box<dyn std::error::Error>>
pub async fn browser_configuration<G, E>(chain_spec: GenericChainSpec<G, E>)
-> Result<Configuration, Box<dyn std::error::Error>>
where
G: RuntimeGenesis + 'static,
E: Extension + 'static,
Expand Down
11 changes: 8 additions & 3 deletions utils/frame/benchmarking-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Substrate. If not, see <http://www.gnu.org/licenses/>.

use std::fmt::Debug;
use sp_runtime::{traits::{Block as BlockT, Header as HeaderT, NumberFor}};
use sc_client::StateMachine;
use sc_cli::{ExecutionStrategy, WasmExecutionMethod, VersionInfo};
Expand Down Expand Up @@ -165,9 +166,13 @@ impl BenchmarkCmd {
&self,
mut config: &mut Configuration,
spec_factory: impl FnOnce(&str) -> Result<Box<dyn ChainSpec>, String>,
version: &VersionInfo,
) -> sc_cli::Result<()> {
self.shared_params.update_config(&mut config, spec_factory, version)?;
_version: &VersionInfo,
) -> sc_cli::Result<()>
{
// Configure chain spec.
let chain_key = self.shared_params.chain.clone().unwrap_or("dev".into());
let spec = spec_factory(&chain_key)?;
config.chain_spec = Some(spec);

// Make sure to configure keystore.
config.use_in_memory_keystore()?;
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.