This commit is contained in:
Ubuntu 2018-05-30 14:17:04 +00:00 committed by Greg Fitzgerald
parent cef1c208a5
commit 6c380e04a3
2 changed files with 11 additions and 3 deletions

View File

@ -1,4 +1,6 @@
#!/bin/bash
export RUST_LOG=solana=info
sudo sysctl -w net.core.rmem_max=26214400
cat genesis.log leader.log | cargo run --release --features cuda --bin solana-fullnode -- -s leader.json -l leader.json -b 8000 -d 2>&1 | tee leader-tee.log
rm leader.log
export RUST_BACKTRACE=1
cat genesis.log leader.log | cargo run --features cuda --bin solana-fullnode -- -s leader.json -l leader.json -b 8000 -d 2>&1 | tee leader-tee.log

View File

@ -4,6 +4,8 @@ extern crate isatty;
extern crate pnet;
extern crate serde_json;
extern crate solana;
#[macro_use]
extern crate log;
use getopts::Options;
use isatty::stdin_isatty;
@ -134,8 +136,12 @@ fn main() {
let mut repl_data = make_repl_data(&bind_addr);
if matches.opt_present("l") {
let path = matches.opt_str("l").unwrap();
if let Ok(file) = File::open(path) {
repl_data = serde_json::from_reader(file).expect("parse");
if let Ok(file) = File::open(path.clone()) {
if let Ok(data) = serde_json::from_reader(file) {
repl_data = data;
} else {
warn!("failed to parse leader {}, generating new identity", path);
}
}
}
let threads = if matches.opt_present("v") {