diff --git a/substrate/core/service/src/chain_ops.rs b/substrate/core/service/src/chain_ops.rs index 83f103ec8f..a0d17bd7a5 100644 --- a/substrate/core/service/src/chain_ops.rs +++ b/substrate/core/service/src/chain_ops.rs @@ -175,7 +175,7 @@ pub fn import_blocks( block_count = b; if b % 1000 == 0 { - info!("#{}", b); + info!("#{} blocks were added to the queue", b); } } @@ -184,6 +184,13 @@ pub fn import_blocks( wait_recv.recv() .expect("Importing thread has panicked. Then the main process will die before this can be reached. qed."); blocks_imported += 1; + if blocks_imported % 1000 == 0 { + info!( + "#{} blocks were imported (#{} left)", + blocks_imported, + count - blocks_imported + ); + } } info!("Imported {} blocks. Best: #{}", block_count, client.info().chain.best_number); diff --git a/substrate/core/sr-api-macros/benches/bench.rs b/substrate/core/sr-api-macros/benches/bench.rs index 55399fb4d8..054f73c3d4 100644 --- a/substrate/core/sr-api-macros/benches/bench.rs +++ b/substrate/core/sr-api-macros/benches/bench.rs @@ -15,7 +15,10 @@ // along with Substrate. If not, see . use criterion::{Criterion, criterion_group, criterion_main}; -use test_client::runtime::TestAPI; +use test_client::{ + DefaultTestClientBuilderExt, TestClientBuilder, + TestClientBuilderExt, runtime::TestAPI, +}; use runtime_primitives::{generic::BlockId, traits::ProvideRuntimeApi}; use state_machine::ExecutionStrategy; @@ -53,13 +56,13 @@ fn sr_api_benchmark(c: &mut Criterion) { }); c.bench_function("calling function by function pointer in wasm", |b| { - let client = test_client::new_with_execution_strategy(ExecutionStrategy::AlwaysWasm); + let client = TestClientBuilder::new().set_execution_strategy(ExecutionStrategy::AlwaysWasm).build(); let block_id = BlockId::Number(client.info().chain.best_number); b.iter(|| client.runtime_api().benchmark_indirect_call(&block_id).unwrap()) }); c.bench_function("calling function in wasm", |b| { - let client = test_client::new_with_execution_strategy(ExecutionStrategy::AlwaysWasm); + let client = TestClientBuilder::new().set_execution_strategy(ExecutionStrategy::AlwaysWasm).build(); let block_id = BlockId::Number(client.info().chain.best_number); b.iter(|| client.runtime_api().benchmark_direct_call(&block_id).unwrap()) }); diff --git a/substrate/core/telemetry/src/lib.rs b/substrate/core/telemetry/src/lib.rs index 3e5d8278b0..d17dd43169 100644 --- a/substrate/core/telemetry/src/lib.rs +++ b/substrate/core/telemetry/src/lib.rs @@ -111,7 +111,7 @@ pub const SUBSTRATE_INFO: &str = "0"; pub const CONSENSUS_TRACE: &str = "9"; pub const CONSENSUS_DEBUG: &str = "5"; pub const CONSENSUS_WARN: &str = "4"; -pub const CONSENSUS_INFO: &str = "0"; +pub const CONSENSUS_INFO: &str = "1"; /// Telemetry object. Implements `Future` and must be polled regularly. /// Contains an `Arc` and can be cloned and pass around. Only one clone needs to be polled diff --git a/substrate/test-utils/transaction-factory/src/complex_mode.rs b/substrate/test-utils/transaction-factory/src/complex_mode.rs index 6200affaea..0d383c3025 100644 --- a/substrate/test-utils/transaction-factory/src/complex_mode.rs +++ b/substrate/test-utils/transaction-factory/src/complex_mode.rs @@ -83,7 +83,7 @@ where let seed = factory_state.start_number() + factory_state.block_no(); let to = RA::gen_random_account_id(&seed); - let mut amount; + let amount; if factory_state.round() == RA::Number::zero() { amount = RA::minimum_balance() * factory_state.rounds(); } else {