Improve error message when genesis file does not match. (#225)

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
pull/2/head
Adrian Sutton 6 years ago committed by GitHub
parent 8ca2196930
commit 338879d9a8
  1. 3
      ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/db/DefaultMutableBlockchain.java
  2. 3
      ethereum/core/src/test/java/tech/pegasys/pantheon/ethereum/db/GenesisBlockMismatchTest.java

@ -350,8 +350,7 @@ public class DefaultMutableBlockchain implements MutableBlockchain {
if (!genesisHash.get().equals(genesisBlock.getHash())) {
throw new InvalidConfigurationException(
"Supplied genesis block does not match stored chain data.\n"
+ "Please ensure the integrity of the file: \'pantheon/ethereum/core/src/main/resources/mainnet.json\'.\n"
+ "To set a custom genesis file employ the runtime option \'--genesis=PATH_TO_FILE\'.");
+ "Please specify a different data directory with --datadir or specify the original genesis file with --genesis.");
}
}
}

@ -92,7 +92,6 @@ public class GenesisBlockMismatchTest {
.isThrownBy(() -> blockchain00.setGenesis(genesisBlock01))
.withMessageContaining(
"Supplied genesis block does not match stored chain data.\n"
+ "Please ensure the integrity of the file: \'pantheon/ethereum/core/src/main/resources/mainnet.json\'.\n"
+ "To set a custom genesis file employ the runtime option \'--genesis=PATH_TO_FILE\'.");
+ "Please specify a different data directory with --datadir or specify the original genesis file with --genesis.");
}
}

Loading…
Cancel
Save