Merge pull request #1329 from ethcore/softforktrigger
Install trigger for DAO-rescue soft-fork.
This commit is contained in:
@@ -42,12 +42,20 @@ Protocol Options:
|
||||
[default: $HOME/.parity/keys].
|
||||
--identity NAME Specify your node's name.
|
||||
|
||||
DAO-Rescue Soft-fork Options:
|
||||
--help-rescue-dao Does nothing - on by default.
|
||||
--dont-help-rescue-dao Votes against the DAO-rescue soft-fork, but supports
|
||||
it if it is triggered anyway.
|
||||
Equivalent to --gas-floor-target=3141592.
|
||||
--dogmatic Ignores all DAO-rescue soft-fork behaviour. Even if
|
||||
it means losing mining rewards.
|
||||
|
||||
Account Options:
|
||||
--unlock ACCOUNTS Unlock ACCOUNTS for the duration of the execution.
|
||||
ACCOUNTS is a comma-delimited list of addresses.
|
||||
--password FILE Provide a file containing a password for unlocking
|
||||
an account.
|
||||
--keys-iterations NUM Specify the number of iterations to use when
|
||||
--keys-iterations NUM Specify the number of iterations to use when
|
||||
deriving key from the password (bigger is more
|
||||
secure) [default: 10240].
|
||||
--no-import-keys Do not import keys from legacy clients.
|
||||
@@ -228,6 +236,8 @@ pub struct Args {
|
||||
pub flag_chain: String,
|
||||
pub flag_db_path: String,
|
||||
pub flag_identity: String,
|
||||
pub flag_dont_help_rescue_dao: bool,
|
||||
pub flag_dogmatic: bool,
|
||||
pub flag_unlock: Option<String>,
|
||||
pub flag_password: Vec<String>,
|
||||
pub flag_cache: Option<usize>,
|
||||
|
||||
@@ -75,12 +75,18 @@ impl Configuration {
|
||||
}
|
||||
|
||||
pub fn gas_floor_target(&self) -> U256 {
|
||||
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)
|
||||
})
|
||||
if self.args.flag_dont_help_rescue_dao || self.args.flag_dogmatic {
|
||||
4_700_000.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)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
pub fn gas_price(&self) -> U256 {
|
||||
match self.args.flag_gasprice.as_ref() {
|
||||
Some(d) => {
|
||||
@@ -124,7 +130,7 @@ impl Configuration {
|
||||
|
||||
pub fn spec(&self) -> Spec {
|
||||
match self.chain().as_str() {
|
||||
"frontier" | "homestead" | "mainnet" => ethereum::new_frontier(),
|
||||
"frontier" | "homestead" | "mainnet" => ethereum::new_frontier(!self.args.flag_dogmatic),
|
||||
"morden" | "testnet" => ethereum::new_morden(),
|
||||
"olympic" => ethereum::new_olympic(),
|
||||
f => Spec::load(contents(f).unwrap_or_else(|_| {
|
||||
|
||||
Reference in New Issue
Block a user