/// Displays the commands or context specific help for a given command
Displays the commands or context specific help for a given command
Displays the commands or context specific help for a given command
fn print_help<'a, I: Iterator<Item = &'a str>>(&self, mut args: I) {
        let help_for = BaseNodeCommand::from_str(args.next().unwrap_or_default()).unwrap_or(BaseNodeCommand::Help);
        use BaseNodeCommand::*;
        match help_for {
            Help => {
                println!("Available commands are: ");
                let joined = self.commands.join(", ");
                println!("{}", joined);
            },
            GetStateInfo => {
                println!("Prints out the status of the base node state machine");
            },
            Version => {
                println!("Gets the current application version");
            },
            GetBalance => {
                println!("Gets your balance");
            },
            ListUtxos => {
                println!("List your UTXOs");
            },
            ListTransactions => {
                println!("Print a list of pending inbound and outbound transactions");
            },
            ListCompletedTransactions => {
                println!("Print a list of completed transactions.");
                println!("USAGE: list-completed-transactions [last n] or list-completed-transactions [n] [m]");
            },
            CancelTransaction => {
                println!("Cancel a transaction");
                println!("USAGE: cancel-transaction [transaction ID]");
            },
            SendTari => {
                println!("Sends an amount of Tari to a address call this command via:");
                println!("send-tari [amount of tari to send] [destination public key or emoji id] [optional: msg]");
            },
            GetChainMetadata => {
                println!("Gets your base node chain meta data");
            },
            DiscoverPeer => {
                println!("Attempt to discover a peer on the Tari network");
            },
            ListPeers => {
                println!("Lists the peers that this node knows about");
            },
            ResetOfflinePeers => {
                println!("Clear offline flag from all peers");
            },
            BanPeer => {
                println!("Bans a peer");
            },
            UnbanPeer => {
                println!("Removes a peer ban");
            },
            UnbanAllPeers => {
                println!("Unbans all peers");
            },
            ListBannedPeers => {
                println!("Lists peers that have been banned by the node or wallet");
            },
            CheckDb => {
                println!("Checks the blockchain database for missing blocks and headers");
            },
            PeriodStats => {
                println!(
                    "Prints out certain stats to of the block chain in csv format for easy copy, use as follows: "
                );
                println!(
                    "Period-stats [start time in unix timestamp] [end time in unix timestamp] [interval period time \
                     in unix timestamp]"
                );
            },
            ListConnections => {
                println!("Lists the peer connections currently held by this node");
            },
            ListHeaders => {
                println!("List the amount of headers, can be called in the following two ways: ");
                println!("list-headers [first header height] [last header height]");
                println!("list-headers [number of headers starting from the chain tip back]");
            },
            CalcTiming => {
                println!("Calculates the time average time taken to mine a given range of blocks.");
            },
            ToggleMining => {
                println!("Enable or disable the miner on this node, calling this command will toggle the state");
            },
            GetMiningState => println!(
                "Displays the mining state. The hash rate is estimated based on the last measured hash rate and the \
                 number of active mining thread."
            ),
            GetBlock => {
                println!("View a block of a height, call this command via:");
                println!("get-block [height of the block] [format]");
                println!(
                    "[height of the block] The height of the block to fetch from the main chain. The genesis block \
                     has height zero."
                );
                println!(
                    "[format] Optional. Supported options are 'json' and 'text'. 'text' is the default if omitted."
                );
            },
            SearchUtxo => {
                println!(
                    "This will search the main chain for the utxo. If the utxo is found, it will print out the block \
                     it was found in."
                );
                println!("search-utxo [hex of commitment of the utxo]");
            },
            SearchKernel => {
                println!(
                    "This will search the main chain for the kernel. If the kernel is found, it will print out the \
                     block it was found in."
                );
                println!("This searches for the kernel via the excess signature");
                println!("search-kernel [hex of nonce] [Hex of signature]");
            },
            SearchStxo => {
                println!(
                    "This will search the main chain for the stxo. If the stxo is found, it will print out the block \
                     it was found in."
                );
                println!("search-stxo [hex of commitment of the stxo]");
            },
            GetMempoolStats => {
                println!("Retrieves your mempools stats");
            },
            GetMempoolState => {
                println!("Retrieves your mempools state");
            },
            Whoami => {
                println!(
                    "Display identity information about this node, including: public key, node ID and the public \
                     address"
                );
            },
            MakeItRain => {
                println!("Sends multiple amounts of Tari to a public wallet address via this command:");
                println!("{}", MAKE_IT_RAIN_USAGE);
            },
            CoinSplit => {
                println!("Constructs a transaction to split a small set of UTXOs into a large set of UTXOs");
            },
            StressTest => {
                println!(
                    "Performs a network stress test by combining coin-split to create test UTXOs and running \
                     make-it-rain afterwards."
                );
                println!("{}", STRESS_TEST_USAGE);
            },
            Exit | Quit => {
                println!("Exits the base node");
            },
        }
    }
fn print_help < ' a , I : Iterator < Item = & ' a str > > ( & self , mut args : I ) { let help_for = BaseNodeCommand :: from_str ( args . next ( ) . unwrap_or_default ( ) ) . unwrap_or ( BaseNodeCommand :: Help ) ; use BaseNodeCommand :: * ; match help_for { Help => { println ! ( " " ) ; let joined = self . commands . join ( " " ) ; println ! ( " " joined ) ; } , GetStateInfo => { println ! ( " " ) ; } , Version => { println ! ( " " ) ; } , GetBalance => { println ! ( " " ) ; } , ListUtxos => { println ! ( " " ) ; } , ListTransactions => { println ! ( " " ) ; } , ListCompletedTransactions => { println ! ( " " ) ; println ! ( " " ) ; } , CancelTransaction => { println ! ( " " ) ; println ! ( " " ) ; } , SendTari => { println ! ( " " ) ; println ! ( " " ) ; } , GetChainMetadata => { println ! ( " " ) ; } , DiscoverPeer => { println ! ( " " ) ; } , ListPeers => { println ! ( " " ) ; } , ResetOfflinePeers => { println ! ( " " ) ; } , BanPeer => { println ! ( " " ) ; } , UnbanPeer => { println ! ( " " ) ; } , UnbanAllPeers => { println ! ( " " ) ; } , ListBannedPeers => { println ! ( " " ) ; } , CheckDb => { println ! ( " " ) ; } , PeriodStats => { println ! ( " " ) ; println ! ( " \
 " ) ; } , ListConnections => { println ! ( " " ) ; } , ListHeaders => { println ! ( " " ) ; println ! ( " " ) ; println ! ( " " ) ; } , CalcTiming => { println ! ( " " ) ; } , ToggleMining => { println ! ( " " ) ; } , GetMiningState => println ! ( " \
 " ) , GetBlock => { println ! ( " " ) ; println ! ( " " ) ; println ! ( " \
 " ) ; println ! ( " " ) ; } , SearchUtxo => { println ! ( " \
 " ) ; println ! ( " " ) ; } , SearchKernel => { println ! ( " \
 " ) ; println ! ( " " ) ; println ! ( " " ) ; } , SearchStxo => { println ! ( " \
 " ) ; println ! ( " " ) ; } , GetMempoolStats => { println ! ( " " ) ; } , GetMempoolState => { println ! ( " " ) ; } , Whoami => { println ! ( " \
 " ) ; } , MakeItRain => { println ! ( " " ) ; println ! ( " " MAKE_IT_RAIN_USAGE ) ; } , CoinSplit => { println ! ( " " ) ; } , StressTest => { println ! ( " \
 " ) ; println ! ( " " STRESS_TEST_USAGE ) ; } , Exit | Quit => { println ! ( " " ) ; } , } }
Displays the commands or context specific help for a given command
Displays the commands or context specific help for a given command
&self
args
I