solana-accounts-tool 0.0.1

Solana Accounts Tool
#![allow(clippy::integer_arithmetic)]
use {
    clap::{
        crate_description, crate_name, App, AppSettings,
    },
    log::*,
    solana_measure::{measure::Measure},
};

#[allow(clippy::cognitive_complexity)]
fn main() {
    // Ignore SIGUSR1 to prevent long-running calls being killed by logrotate
    // in warehouse deployments
    #[cfg(unix)]
    {
        // `register()` is unsafe because the action is called in a signal handler
        // with the usual caveats. So long as this action body stays empty, we'll
        // be fine
        unsafe { signal_hook::low_level::register(signal_hook::consts::SIGUSR1, || {}) }.unwrap();
    }

    solana_logger::setup_with_default("solana=info");
    let mut measure_total_execution_time = Measure::start("accounts tool");

    let _matches = App::new(crate_name!())
        .about(crate_description!())
        .version(solana_version::version!())
        .setting(AppSettings::InferSubcommands)
        .setting(AppSettings::SubcommandRequiredElseHelp)
        .setting(AppSettings::VersionlessSubcommands)
        .get_matches();

    info!("{} {}", crate_name!(), solana_version::version!());

    measure_total_execution_time.stop();
    info!("{}", measure_total_execution_time);
}