2019-03-11 15:26:35 +01:00
|
|
|
#!/bin/bash
|
|
|
|
set -e # fail on any error
|
|
|
|
set -u # treat unset variables as error
|
|
|
|
echo "________Running validate_chainspecs.sh________"
|
2017-08-02 12:50:36 +02:00
|
|
|
|
|
|
|
ERR=0
|
2019-03-11 15:26:35 +01:00
|
|
|
|
|
|
|
echo "________Validate chainspecs________"
|
2019-04-12 18:51:01 +02:00
|
|
|
time cargo build --release -p chainspec --verbose --color=always
|
2017-08-02 12:50:36 +02:00
|
|
|
|
|
|
|
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
|
2019-12-06 13:12:08 +01:00
|
|
|
|
|
|
|
echo "________Mainnet contains Istanbul EIPs________"
|
|
|
|
for eip in $(grep --only-matching "eip.*Transition" ethcore/res/ethereum/istanbul_test.json); do
|
|
|
|
if ! grep -q $eip ethcore/res/ethereum/foundation.json; then
|
|
|
|
echo "ERROR: $eip is missing in the foundation json spec"
|
|
|
|
ERR=1
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2019-10-02 22:01:20 +02:00
|
|
|
#show sccache statistics
|
2019-10-08 20:58:34 +02:00
|
|
|
sccache --show-stats
|
2017-08-02 12:50:36 +02:00
|
|
|
exit $ERR
|