Skip to content

Commit

Permalink
Ensure genesis ledger directory is populated on all validator nodes
Browse files Browse the repository at this point in the history
This allows all nodes to serve the genesis ledger over rsync instead of
just the bootstrap leader
  • Loading branch information
mvines committed Mar 21, 2019
1 parent a2bdfca commit d362911
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions multinode-demo/fullnode.sh
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,13 @@ rsync_url() { # adds the 'rsync://` prefix to URLs that need it

rsync_leader_url=$(rsync_url "$leader")
set -ex
if [[ ! -d "$SOLANA_RSYNC_CONFIG_DIR"/ledger ]]; then
$rsync -vPr "$rsync_leader_url"/config/ledger "$SOLANA_RSYNC_CONFIG_DIR"/ledger
fi

if [[ ! -d "$ledger_config_dir" ]]; then
$rsync -vPr "$rsync_leader_url"/config/ledger/ "$ledger_config_dir"
[[ -d $ledger_config_dir ]] || {
echo "Unable to retrieve ledger from $rsync_leader_url"
exit 1
}
cp -a "$SOLANA_RSYNC_CONFIG_DIR"/ledger/ "$ledger_config_dir"
$solana_ledger_tool --ledger "$ledger_config_dir" verify

fi

trap 'kill "$pid" && wait "$pid"' INT TERM ERR
Expand Down

0 comments on commit d362911

Please sign in to comment.