Skip to content

Commit

Permalink
Added logging for case when genesis file is used not from resources
Browse files Browse the repository at this point in the history
  • Loading branch information
zilm13 committed Nov 15, 2016
1 parent 5e49eda commit 5d24701
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
import org.ethereum.trie.SecureTrie;
import org.ethereum.trie.Trie;
import org.ethereum.util.ByteUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.spongycastle.util.encoders.Hex;

import java.io.File;
Expand All @@ -25,6 +27,8 @@

public class GenesisLoader {

private static Logger logger = LoggerFactory.getLogger("general");

/**
* Load genesis from passed location or from classpath `genesis` directory
*/
Expand All @@ -34,6 +38,7 @@ public static Genesis loadGenesis(SystemProperties config, ClassLoader classLoad

// #1 try to find genesis at passed location
if (genesisFile != null) {
logger.info("genesisFile option used, overrides config genesis with file from path: {}", genesisFile);
try (InputStream is = new FileInputStream(new File(genesisFile))) {
return GenesisLoader.loadGenesis(config, is);
} catch (Exception e) {
Expand Down

0 comments on commit 5d24701

Please sign in to comment.