Remove soft-fork stuff.
This commit is contained in:
@@ -57,9 +57,8 @@ Operating Options:
|
||||
--fork POLICY Specifies the client's fork policy. POLICY must be
|
||||
one of:
|
||||
dogmatic - sticks rigidly to the standard chain.
|
||||
dao-soft - votes for the DAO-rescue soft-fork.
|
||||
normal - goes with whatever fork is decided but
|
||||
votes for none. [default: normal].
|
||||
none - goes with whatever fork is decided but
|
||||
votes for none. [default: none].
|
||||
|
||||
Account Options:
|
||||
--unlock ACCOUNTS Unlock ACCOUNTS for the duration of the execution.
|
||||
|
||||
@@ -49,8 +49,7 @@ pub struct Directories {
|
||||
|
||||
#[derive(Eq, PartialEq, Debug)]
|
||||
pub enum Policy {
|
||||
DaoSoft,
|
||||
Normal,
|
||||
None,
|
||||
Dogmatic,
|
||||
}
|
||||
|
||||
@@ -135,33 +134,24 @@ impl Configuration {
|
||||
|
||||
pub fn policy(&self) -> Policy {
|
||||
match self.args.flag_fork.as_str() {
|
||||
"dao-soft" => Policy::DaoSoft,
|
||||
"normal" => Policy::Normal,
|
||||
"none" => Policy::None,
|
||||
"dogmatic" => Policy::Dogmatic,
|
||||
x => die!("{}: Invalid value given for --policy option. Use --help for more info.", x)
|
||||
}
|
||||
}
|
||||
|
||||
pub fn gas_floor_target(&self) -> U256 {
|
||||
if self.policy() == Policy::DaoSoft {
|
||||
3_141_592.into()
|
||||
} else {
|
||||
let d = &self.args.flag_gas_floor_target;
|
||||
U256::from_dec_str(d).unwrap_or_else(|_| {
|
||||
die!("{}: Invalid target gas floor given. Must be a decimal unsigned 256-bit number.", d)
|
||||
})
|
||||
}
|
||||
let d = &self.args.flag_gas_floor_target;
|
||||
U256::from_dec_str(d).unwrap_or_else(|_| {
|
||||
die!("{}: Invalid target gas floor given. Must be a decimal unsigned 256-bit number.", d)
|
||||
})
|
||||
}
|
||||
|
||||
pub fn gas_ceil_target(&self) -> U256 {
|
||||
if self.policy() == Policy::DaoSoft {
|
||||
3_141_592.into()
|
||||
} else {
|
||||
let d = &self.args.flag_gas_cap;
|
||||
U256::from_dec_str(d).unwrap_or_else(|_| {
|
||||
die!("{}: Invalid target gas ceiling given. Must be a decimal unsigned 256-bit number.", d)
|
||||
})
|
||||
}
|
||||
let d = &self.args.flag_gas_cap;
|
||||
U256::from_dec_str(d).unwrap_or_else(|_| {
|
||||
die!("{}: Invalid target gas ceiling given. Must be a decimal unsigned 256-bit number.", d)
|
||||
})
|
||||
}
|
||||
|
||||
pub fn gas_price(&self) -> U256 {
|
||||
@@ -207,7 +197,7 @@ impl Configuration {
|
||||
|
||||
pub fn spec(&self) -> Spec {
|
||||
match self.chain().as_str() {
|
||||
"frontier" | "homestead" | "mainnet" => ethereum::new_frontier(self.policy() != Policy::Dogmatic),
|
||||
"frontier" | "homestead" | "mainnet" => ethereum::new_frontier(),
|
||||
"morden" | "testnet" => ethereum::new_morden(),
|
||||
"olympic" => ethereum::new_olympic(),
|
||||
f => Spec::load(contents(f).unwrap_or_else(|_| {
|
||||
|
||||
@@ -97,7 +97,7 @@ use rpc::RpcServer;
|
||||
use signer::{SignerServer, new_token};
|
||||
use dapps::WebappServer;
|
||||
use io_handler::ClientIoHandler;
|
||||
use configuration::Configuration;
|
||||
use configuration::{Policy, Configuration};
|
||||
|
||||
fn main() {
|
||||
let conf = Configuration::parse();
|
||||
@@ -199,6 +199,11 @@ fn execute_client(conf: Configuration, spec: Spec, client_config: ClientConfig)
|
||||
warn!("NOTE that Signer will not ask you to confirm transactions from unlocked account.");
|
||||
}
|
||||
|
||||
// Check fork settings.
|
||||
if conf.policy() != Policy::None {
|
||||
warn!("Value given for --policy, yet no proposed forks exist. Ignoring.");
|
||||
}
|
||||
|
||||
// Secret Store
|
||||
let account_service = Arc::new(conf.account_service());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user