mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 15:47:58 +00:00
Warn validators with slow hardware (#12620)
* move Metric * run hardware bench if validiator flag is being used * fix rustdoc & update node-template * fix * unused improt * warn * move Requirement * bench_result * ensure_requirements * make the code compile * check if authority * Update client/sysinfo/src/sysinfo.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * nit fixes * warning signs * Update client/sysinfo/src/sysinfo.rs Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
//! Service implementation. Specialized wrapper over substrate service.
|
||||
|
||||
use codec::Encode;
|
||||
use frame_benchmarking_cli::SUBSTRATE_REFERENCE_HARDWARE;
|
||||
use frame_system_rpc_runtime_api::AccountNonceApi;
|
||||
use futures::prelude::*;
|
||||
use kitchensink_runtime::RuntimeApi;
|
||||
@@ -320,7 +321,11 @@ pub fn new_full_base(
|
||||
let hwbench = if !disable_hardware_benchmarks {
|
||||
config.database.path().map(|database_path| {
|
||||
let _ = std::fs::create_dir_all(&database_path);
|
||||
sc_sysinfo::gather_hwbench(Some(database_path))
|
||||
sc_sysinfo::gather_hwbench(
|
||||
Some(database_path),
|
||||
SUBSTRATE_REFERENCE_HARDWARE.clone(),
|
||||
config.role.is_authority(),
|
||||
)
|
||||
})
|
||||
} else {
|
||||
None
|
||||
|
||||
Reference in New Issue
Block a user