Update SF to latest spec (#1386)

* Introduce whitelist for softfork

* Use extradata for fork id.

* Fix condition.
This commit is contained in:
Gav Wood
2016-06-22 15:37:25 +02:00
committed by GitHub
parent 11314a660d
commit 353b9e91e6
2 changed files with 22 additions and 12 deletions

View File

@@ -121,10 +121,14 @@ impl Configuration {
}
pub fn extra_data(&self) -> Bytes {
match self.args.flag_extradata.as_ref().or(self.args.flag_extra_data.as_ref()) {
Some(ref x) if x.len() <= 32 => x.as_bytes().to_owned(),
None => version_data(),
Some(ref x) => { die!("{}: Extra data must be at most 32 characters.", x); }
if !self.args.flag_dont_help_rescue_dao {
(b"rescuedao"[..]).to_owned()
} else {
match self.args.flag_extradata.as_ref().or(self.args.flag_extra_data.as_ref()) {
Some(ref x) if x.len() <= 32 => x.as_bytes().to_owned(),
None => version_data(),
Some(ref x) => { die!("{}: Extra data must be at most 32 characters.", x); }
}
}
}