mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 05:11:02 +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
@@ -255,10 +255,14 @@ async fn start_node_impl(
|
||||
// Here you can check whether the hardware meets your chains' requirements. Putting a link
|
||||
// in there and swapping out the requirements for your own are probably a good idea. The
|
||||
// requirements for a para-chain are dictated by its relay-chain.
|
||||
if !SUBSTRATE_REFERENCE_HARDWARE.check_hardware(&hwbench) && validator {
|
||||
log::warn!(
|
||||
"⚠️ The hardware does not meet the minimal requirements for role 'Authority'."
|
||||
match SUBSTRATE_REFERENCE_HARDWARE.check_hardware(&hwbench) {
|
||||
Err(err) if validator => {
|
||||
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