Commit b4e6018d authored by Grégoire Henry's avatar Grégoire Henry Committed by Pierre Boutillier

P2p: do not use ipv4 discovery in sandboxed scripts (closes 477)

This partially revert f51b8ad9.

We should way until a proper configuration-less discovery mechanism
based on ipv6_multicast is re-enabled before to use it by default in
the tests.
parent 32348c09
Pipeline #49118737 passed with stages
in 7 minutes and 26 seconds
......@@ -169,7 +169,7 @@ usage() {
echo "Small script to initialize a client to a local and closed test network with a maximum of 9 nodes."
echo
echo "Usage: eval \`$0 <id>\`"
echo " where <id> should be a positive integer."
echo " where <id> should be an integer between 1 and 9."
}
main () {
......@@ -189,7 +189,7 @@ main () {
local_compiler="${local_compiler:-$(which tezos-protocol-compiler)}"
fi
if [ $# -lt 1 ] || [ "$1" -le 0 ] ; then
if [ $# -lt 1 ] || [ "$1" -le 0 ] || [ 10 -le "$1" ]; then
usage
exit 1
fi
......
......@@ -17,8 +17,11 @@ start_sandboxed_node() {
expected_connections="${expected_connections:-3}"
node_dir="$(mktemp -d -t tezos-node.XXXXXXXX)"
peers=("--no-bootstrap-peers")
for peer_port in $(seq 19730 $((19730 + max_peer_id))); do
peers+=("--peer")
peers+=("127.0.0.1:$peer_port")
done
peers+=("--private-mode")
node="${local_node}"
sandbox_param="--sandbox=$sandbox_file"
......@@ -38,7 +41,6 @@ EOF
--data-dir "$node_dir" \
--net-addr "127.0.0.1:$port" \
--rpc-addr "127.0.0.1:$rpc" \
--discovery-addr "127.255.255.255" \
--rpc-tls "${node_dir}/tezos.crt,${node_dir}/tezos.key" \
--expected-pow "$expected_pow" \
--connections "$expected_connections"
......@@ -167,7 +169,6 @@ EOF
--data-dir "$node_dir" \
--net-addr "127.0.0.1:$port" \
--rpc-addr "127.0.0.1:$rpc" \
--discovery-addr "127.255.255.255" \
--expected-pow "$expected_pow" \
--connections "$expected_connections"
fi
......@@ -196,11 +197,11 @@ main() {
sandbox_file="${sandbox_file:-sandbox.json}"
fi
if [ $# -lt 1 ] || [ "$1" -le 0 ]; then
if [ $# -lt 1 ] || [ "$1" -le 0 ] || [ 10 -le "$1" ]; then
echo "Small script to launch local and closed test network with a maximum of 9 nodes."
echo
echo "Usage: $0 <id>"
echo " where <id> should be a positive integer."
echo " where <id> should be an integer between 1 and 9."
exit 1
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment