package org.ethereum;

import org.ethereum.cli.CLIInterface;
import org.ethereum.config.SystemProperties;
import org.ethereum.facade.Ethereum;
import org.ethereum.facade.EthereumFactory;
import org.ethereum.mine.Ethash;

import java.io.IOException;
import java.net.URISyntaxException;

/**
 * @author Roman Mandeleil
 * @since 14.11.2014
 */
public class Start {

    public static void main(String args[]) throws IOException, URISyntaxException {
        CLIInterface.call(args);

        final SystemProperties config = SystemProperties.getDefault();
        final boolean actionBlocksLoader = !config.blocksLoader().equals("");
        final boolean actionGenerateDag = config.getConfig().hasPath("ethash.blockNumber");

        if (actionBlocksLoader || actionGenerateDag) {
            config.setSyncEnabled(false);
            config.setDiscoveryEnabled(false);
        }

        if (actionGenerateDag) {
            new Ethash(config, config.getConfig().getLong("ethash.blockNumber")).getFullDataset();
            // DAG file has been created, lets exit
            System.exit(0);
        } else {
            Ethereum ethereum = EthereumFactory.createEthereum();

            if (actionBlocksLoader) {
                ethereum.getBlockLoader().loadBlocks();
            }
        }
    }

}

@@ -16,16 +16,61 @@
 ereum;%0A%0A
+import org.apache.commons.lang3.StringUtils;%0A
 import o
@@ -715,34 +715,47 @@
 g = 
-config.getConfig().hasPath
+!StringUtils.isEmpty(System.getProperty
 (%22et
@@ -772,16 +772,17 @@
 Number%22)
+)
 ;%0A%0A     
@@ -999,34 +999,41 @@
 ig, 
-config.getConfig().getLong
+Long.parseLong(System.getProperty
 (%22et
@@ -1051,16 +1051,17 @@
 umber%22))
+)
 .getFull

Debug CI