clippy
This commit is contained in:
parent
48ab88a2af
commit
c4220a4853
|
@ -141,27 +141,7 @@ impl Validator {
|
||||||
|
|
||||||
warn!("identity pubkey: {:?}", id);
|
warn!("identity pubkey: {:?}", id);
|
||||||
warn!("vote pubkey: {:?}", vote_account);
|
warn!("vote pubkey: {:?}", vote_account);
|
||||||
warn!(
|
report_target_features();
|
||||||
"CUDA is {}abled",
|
|
||||||
if solana_perf::perf_libs::api().is_some() {
|
|
||||||
"en"
|
|
||||||
} else {
|
|
||||||
"dis"
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
// Validator binaries built on a machine with AVX support will generate invalid opcodes
|
|
||||||
// when run on machines without AVX causing a non-obvious process abort. Instead detect
|
|
||||||
// the mismatch and error cleanly.
|
|
||||||
#[target_feature(enable = "avx")]
|
|
||||||
{
|
|
||||||
if is_x86_feature_detected!("avx") {
|
|
||||||
info!("AVX detected");
|
|
||||||
} else {
|
|
||||||
error!("Your machine does not have AVX support, please rebuild from source on your machine");
|
|
||||||
process::exit(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
info!("entrypoint: {:?}", entrypoint_info_option);
|
info!("entrypoint: {:?}", entrypoint_info_option);
|
||||||
|
|
||||||
|
@ -603,6 +583,30 @@ pub fn new_validator_for_tests() -> (Validator, ContactInfo, Keypair, PathBuf) {
|
||||||
(node, contact_info, mint_keypair, ledger_path)
|
(node, contact_info, mint_keypair, ledger_path)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn report_target_features() {
|
||||||
|
warn!(
|
||||||
|
"CUDA is {}abled",
|
||||||
|
if solana_perf::perf_libs::api().is_some() {
|
||||||
|
"en"
|
||||||
|
} else {
|
||||||
|
"dis"
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// Validator binaries built on a machine with AVX support will generate invalid opcodes
|
||||||
|
// when run on machines without AVX causing a non-obvious process abort. Instead detect
|
||||||
|
// the mismatch and error cleanly.
|
||||||
|
#[target_feature(enable = "avx")]
|
||||||
|
{
|
||||||
|
if is_x86_feature_detected!("avx") {
|
||||||
|
info!("AVX detected");
|
||||||
|
} else {
|
||||||
|
error!("Your machine does not have AVX support, please rebuild from source on your machine");
|
||||||
|
process::exit(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Get the activated stake percentage (based on the provided bank) that is visible in gossip
|
// Get the activated stake percentage (based on the provided bank) that is visible in gossip
|
||||||
fn get_stake_percent_in_gossip(
|
fn get_stake_percent_in_gossip(
|
||||||
bank: &Arc<solana_runtime::bank::Bank>,
|
bank: &Arc<solana_runtime::bank::Bank>,
|
||||||
|
|
Loading…
Reference in New Issue