Chainspec validation (#6197)

* chainspec validation

* better error formatting for chainspec

* lint validate_chainspecs.sh

* quit takes &str instead of S: AsRef<str>

* push CI

* don't double check spec validity
This commit is contained in:
Marek Kotewicz
2017-08-02 12:50:36 +02:00
committed by Arkadiy Paronyan
parent 8de1e92b99
commit 0c7c34e609
10 changed files with 95 additions and 35 deletions

15
scripts/validate_chainspecs.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/sh
ERR=0
cargo build --release -p chainspec
for spec in ethcore/res/*.json; do
if ! ./target/release/chainspec "$spec"; then ERR=1; fi
done
for spec in ethcore/res/ethereum/*.json; do
if ! ./target/release/chainspec "$spec"; then ERR=1; fi
done
exit $ERR