Skip to content

Commit

Permalink
add hash verification
Browse files Browse the repository at this point in the history
  • Loading branch information
gartnera committed Aug 30, 2024
1 parent 383d790 commit 8757f46
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,12 @@ install_genesis_zetacored() {
}

restore_snapshot() {
snapshot_link=$($CURL "${ZETACHAIN_SNAPSHOT_METADATA_URL}" | jq -r '.snapshots[0].link')
snapshot=$($CURL "${ZETACHAIN_SNAPSHOT_METADATA_URL}" | jq -r '.snapshots[0]')
snapshot_link=$(echo "$snapshot" | jq -r '.link')
snapshot_md5=$(echo "$snapshot" | jq -r '.checksums.md5')
echo "Restoring snapshot from ${snapshot_link}"
dl-pipe "$snapshot_link" | tar x -C $HOME/.zetacored
# https://github.com/zeta-chain/dl-pipe
dl-pipe -hash "md5:${snapshot_md5}" "$snapshot_link" | tar x -C $HOME/.zetacored
}

cd $HOME
Expand Down

0 comments on commit 8757f46

Please sign in to comment.