test-validator: Display genesis hash in dashboard (backport #17216) (#17225)

* rpc: plumb shred_version through RpcContactInfo

(cherry picked from commit 67e6a3106f)

* test-validator: Display more cluster info in dash

(cherry picked from commit 754c708473)

Co-authored-by: Trent Nelson <trent@solana.com>
This commit is contained in:
mergify[bot]
2021-05-14 09:56:27 +00:00
committed by GitHub
parent 802c5fcb00
commit a08a6d55fa
4 changed files with 17 additions and 3 deletions

View File

@@ -87,13 +87,20 @@ impl Dashboard {
continue;
}
};
println_name_value("Identity:", &identity.to_string());
if let Ok(genesis_hash) = rpc_client.get_genesis_hash() {
println_name_value("Genesis Hash:", &genesis_hash.to_string());
}
if let Some(contact_info) = get_contact_info(&rpc_client, &identity) {
println_name_value(
"Version:",
&contact_info.version.unwrap_or_else(|| "?".to_string()),
);
if let Some(shred_version) = contact_info.shred_version {
println_name_value("Shred Version:", &shred_version.to_string());
}
if let Some(gossip) = contact_info.gossip {
println_name_value("Gossip Address:", &gossip.to_string());
}