Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion scripts/tests/calibnet_kademlia_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ cat <<- EOF > $CONFIG_PATH
kademlia = true
EOF

handle_auto_download_snapshot_env
$FOREST_PATH --chain calibnet --encrypt-keystore false --auto-download-snapshot --config "$CONFIG_PATH" --save-token ./admin_token --rpc-address 127.0.0.1:12345 --metrics-address 127.0.0.1:6117 --healthcheck-address 127.0.0.1:2347 &
FOREST_NODE_PID=$!
# Verify that more peers are connected via kademlia
Expand Down
1 change: 0 additions & 1 deletion scripts/tests/calibnet_no_discovery_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ function shutdown {

trap shutdown EXIT

handle_auto_download_snapshot_env
$FOREST_PATH --chain calibnet --encrypt-keystore false --mdns false --kademlia false --auto-download-snapshot --exit-after-init
$FOREST_PATH --chain calibnet --encrypt-keystore false --mdns false --kademlia false --auto-download-snapshot --log-dir "$LOG_DIRECTORY" &
FOREST_NODE_PID=$!
Expand Down
1 change: 0 additions & 1 deletion scripts/tests/calibnet_stateless_mode_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ cat <<- EOF > $CONFIG_PATH
kademlia = false
EOF

handle_auto_download_snapshot_env
# Disable discovery to not connect to more nodes
$FOREST_PATH --chain calibnet --encrypt-keystore false --auto-download-snapshot --config "$CONFIG_PATH" --rpc false --metrics-address 127.0.0.1:6117 --healthcheck-address 127.0.0.1:2347 &
FOREST_NODE_PID=$!
Expand Down
14 changes: 0 additions & 14 deletions scripts/tests/harness.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,13 @@ LOG_DIRECTORY=$TMP_DIR/logs
export TMP_DIR
export LOG_DIRECTORY

# Use `aria2` to fetch the latest calibnet snapshot
# when `FOREST_AUTO_DOWNLOAD_SNAPSHOT_PATH` is set
# This optimization is used on CI to speed up snapshot downloading
function handle_auto_download_snapshot_env {
if [[ -n "${FOREST_AUTO_DOWNLOAD_SNAPSHOT_PATH:-}" ]]; then
echo "Downloading calibnet snapshot to ${FOREST_AUTO_DOWNLOAD_SNAPSHOT_PATH}"
mkdir -p "$(dirname "${FOREST_AUTO_DOWNLOAD_SNAPSHOT_PATH}")"
aria2c -x5 -c https://forest-archive.chainsafe.dev/latest/calibnet/ \
-d "$(dirname "${FOREST_AUTO_DOWNLOAD_SNAPSHOT_PATH}")" \
-o "$(basename "${FOREST_AUTO_DOWNLOAD_SNAPSHOT_PATH}")"
fi
}

function forest_import_non_calibnet_snapshot {
echo "Importing a non calibnet snapshot"
$FOREST_PATH --chain calibnet --encrypt-keystore false --halt-after-import --import-snapshot ./test-snapshots/chain4.car
}

function forest_download_and_import_snapshot {
echo "Downloading and importing snapshot"
handle_auto_download_snapshot_env
$FOREST_PATH --chain calibnet --encrypt-keystore false --halt-after-import --height=-200 --auto-download-snapshot
}

Expand Down
Loading