More Backports for Stable 2.3.5 (#10430)

* revert some changes, could be buggy (#10399)

* ci: clean up gitlab-ci.yml leftovers from previous merge (#10429)

* 10000 > 5000 (#10422)

addresses #10418

* fix underflow in pip, closes #10419 (#10423)

* fix panic when logging directory does not exist, closes #10420 (#10424)

* Update hardcoded headers for Foundation, Ropsten, Kovan and Classic (#10417)

* update foundation to #7262209

* update kovan to #10434561

* update ropsten to #5027841

* update classic to #7555073

* Update Ropsten headers to #5101569
This commit is contained in:
Hernando Castano
2019-02-27 16:33:20 +01:00
committed by GitHub
parent 0d63c932af
commit ebd0fd0117
9 changed files with 4273 additions and 3051 deletions

View File

@@ -899,7 +899,7 @@ usage! {
["Snapshot Options"]
FLAG flag_no_periodic_snapshot: (bool) = false, or |c: &Config| c.snapshots.as_ref()?.disable_periodic.clone(),
"--no-periodic-snapshot",
"Disable automated snapshots which usually occur once every 10000 blocks.",
"Disable automated snapshots which usually occur once every 5000 blocks.",
ARG arg_snapshot_threads: (Option<usize>) = None, or |c: &Config| c.snapshots.as_ref()?.processing_threads,
"--snapshot-threads=[NUM]",

View File

@@ -459,7 +459,8 @@ impl Configuration {
}
}
fn logger_config(&self) -> LogConfig {
/// returns logger config
pub fn logger_config(&self) -> LogConfig {
LogConfig {
mode: self.args.arg_logging.clone(),
color: !self.args.flag_no_color && !cfg!(windows),

View File

@@ -28,6 +28,7 @@ extern crate parity_ethereum;
extern crate parking_lot;
#[cfg(windows)] extern crate winapi;
extern crate ethcore_logger;
use std::ffi::OsString;
use std::fs::{remove_file, metadata, File, create_dir_all};
@@ -42,6 +43,7 @@ use dir::default_hypervisor_path;
use fdlimit::raise_fd_limit;
use parity_ethereum::{start, ExecutionAction};
use parking_lot::{Condvar, Mutex};
use ethcore_logger::setup_log;
const PLEASE_RESTART_EXIT_CODE: i32 = 69;
const PARITY_EXECUTABLE_NAME: &str = "parity";
@@ -184,6 +186,11 @@ fn main_direct(force_can_restart: bool) -> i32 {
parity_ethereum::Configuration::parse_cli(&args).unwrap_or_else(|e| e.exit())
};
let logger = setup_log(&conf.logger_config()).unwrap_or_else(|e| {
eprintln!("{}", e);
process::exit(2)
});
if let Some(spec_override) = take_spec_name_override() {
conf.args.flag_testnet = false;
conf.args.arg_chain = spec_override;