|
|
|
@ -18,6 +18,7 @@ use winapi::um::wincon::{ATTACH_PARENT_PROCESS, AttachConsole, FreeConsole};
|
|
|
|
|
use alfis::{Block, Bytes, Chain, Miner, Context, Network, Settings, dns_utils, Keystore};
|
|
|
|
|
use alfis::blockchain::BLOCK_DIFFICULTY;
|
|
|
|
|
|
|
|
|
|
#[cfg(webui)]
|
|
|
|
|
mod web_ui;
|
|
|
|
|
|
|
|
|
|
const SETTINGS_FILENAME: &str = "alfis.toml";
|
|
|
|
@ -37,6 +38,7 @@ fn main() {
|
|
|
|
|
|
|
|
|
|
let mut opts = Options::new();
|
|
|
|
|
opts.optflag("h", "help", "Print this help menu");
|
|
|
|
|
#[cfg(webui)]
|
|
|
|
|
opts.optflag("n", "nogui", "Run without graphic user interface");
|
|
|
|
|
opts.optflag("v", "verbose", "Show more debug messages");
|
|
|
|
|
opts.optflag("d", "debug", "Show trace messages, more than debug");
|
|
|
|
@ -54,7 +56,10 @@ fn main() {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[cfg(webui)]
|
|
|
|
|
let no_gui = opt_matches.opt_present("n");
|
|
|
|
|
#[cfg(not(webui))]
|
|
|
|
|
let no_gui = true;
|
|
|
|
|
|
|
|
|
|
let mut level = LevelFilter::Info;
|
|
|
|
|
if opt_matches.opt_present("v") {
|
|
|
|
@ -111,6 +116,7 @@ fn main() {
|
|
|
|
|
thread::sleep(sleep);
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
#[cfg(webui)]
|
|
|
|
|
web_ui::run_interface(context.clone(), miner.clone());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|