mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 19:17:58 +00:00
substrate: sysinfo: Expose failed hardware requirements (#2144)
The check_hardware functions does not give us too much information as to what is failing, so let's return the list of failed metrics, so that callers can print it. This would make debugging easier, rather than try to guess which dimension is actually failing. Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
This commit is contained in:
committed by
GitHub
parent
e9987401f3
commit
dca142398e
@@ -449,10 +449,14 @@ pub fn new_full_base(
|
||||
|
||||
if let Some(hwbench) = hwbench {
|
||||
sc_sysinfo::print_hwbench(&hwbench);
|
||||
if !SUBSTRATE_REFERENCE_HARDWARE.check_hardware(&hwbench) && role.is_authority() {
|
||||
log::warn!(
|
||||
"⚠️ The hardware does not meet the minimal requirements for role 'Authority'."
|
||||
);
|
||||
match SUBSTRATE_REFERENCE_HARDWARE.check_hardware(&hwbench) {
|
||||
Err(err) if role.is_authority() => {
|
||||
log::warn!(
|
||||
"⚠️ The hardware does not meet the minimal requirements {} for role 'Authority'.",
|
||||
err
|
||||
);
|
||||
},
|
||||
_ => {},
|
||||
}
|
||||
|
||||
if let Some(ref mut telemetry) = telemetry {
|
||||
|
||||
Reference in New Issue
Block a user