mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-22 20:45:40 +00:00
add a script for verifying the shell chain spec
This commit is contained in:
Executable
+21
@@ -0,0 +1,21 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
echo Usage:
|
||||||
|
echo "$0 <generated shell spec>"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
spec_path=$1
|
||||||
|
|
||||||
|
# sort the json files by key to make sure they are the same when hashed
|
||||||
|
jq --sort-keys . polkadot-parachains/res/shell-statemint.json > sorted.json
|
||||||
|
# generate the checksum
|
||||||
|
sha256sum sorted.json > chainspec-checksum
|
||||||
|
|
||||||
|
# overwrite the sorted chainspec json...
|
||||||
|
jq --sort-keys . $spec_path > sorted.json
|
||||||
|
# ... so that we can verify the checksum
|
||||||
|
sha256sum --check chainspec-checksum
|
||||||
Reference in New Issue
Block a user