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

Adrian Sutton 6 years ago committed by GitHub
parent 6ccb06012e
commit d650f469f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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