New data paths with upgrade

This commit is contained in:
arkpar
2016-12-12 16:51:07 +01:00
parent 95af942fc9
commit 6601fde328
23 changed files with 259 additions and 87 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "Ethereum Classic",
"forkName": "classic",
"dataDir": "classic",
"engine": {
"Ethash": {
"params": {

View File

@@ -1,6 +1,6 @@
{
"name": "Expanse",
"forkName": "expanse",
"dataDir": "expanse",
"engine": {
"Ethash": {
"params": {

View File

@@ -1,5 +1,6 @@
{
"name": "Frontier/Homestead",
"dataDir": "ethereum",
"engine": {
"Ethash": {
"params": {

View File

@@ -1,5 +1,6 @@
{
"name": "Morden",
"dataDir": "test",
"engine": {
"Ethash": {
"params": {

View File

@@ -1,5 +1,6 @@
{
"name": "Ropsten",
"dataDir": "test",
"engine": {
"Ethash": {
"params": {

View File

@@ -77,9 +77,6 @@ impl ClientService {
panic_handler.forward_from(&io_service);
info!("Configured for {} using {} engine", Colour::White.bold().paint(spec.name.clone()), Colour::Yellow.bold().paint(spec.engine.name()));
if spec.fork_name.is_some() {
warn!("Your chain is an alternative fork. {}", Colour::Red.bold().paint("TRANSACTIONS MAY BE REPLAYED ON THE MAINNET!"));
}
let mut db_config = DatabaseConfig::with_columns(::db::NUM_COLUMNS);

View File

@@ -67,7 +67,7 @@ pub struct Spec {
/// What engine are we using for this?
pub engine: Arc<Engine>,
/// The fork identifier for this chain. Only needed to distinguish two chains sharing the same genesis.
pub fork_name: Option<String>,
pub data_dir: String,
/// Known nodes on the network in enode format.
pub nodes: Vec<String>,
@@ -110,10 +110,10 @@ impl From<ethjson::spec::Spec> for Spec {
let seal: GenericSeal = g.seal.into();
let params = CommonParams::from(s.params);
Spec {
name: s.name.into(),
name: s.name.clone().into(),
params: params.clone(),
engine: Spec::engine(s.engine, params, builtins),
fork_name: s.fork_name.map(Into::into),
data_dir: s.data_dir.unwrap_or(s.name).into(),
nodes: s.nodes.unwrap_or_else(Vec::new),
parent_hash: g.parent_hash,
transactions_root: g.transactions_root,