mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 06:06:44 +00:00
* no more alias, swarm is executable so it can be called via ssh * environment vars now set to default, no need to preconfigure * stop method falls back to kill -9 after 10s * enode method now supplies ip addr via ipecho request * execute, options, rawoptions, setup, create-account addpeers and hive methods and subcommands * local and remote hive monitoring * gethup.sh script now merged into swarm script and nice modularised * simplify bash code and fix e2e tests in swarm/test * update-src -> update * remote-update-scripts, remote-update-bin and remote-run * local and remote monitoring of kademlia * extensive documentation in swarm/cmd/README.md swarm/network: fix hive stop issue leading to send on closed chan + minor logging fixes swarm/network/kademlia: * simplify code * now really fix prox limit adjustment + tests and comments * simplify and make readable findclosest algo code + comments * reset initial time interval settings for kaddb findbest * fix bucket replace scheme to optimise stability and availability * absolute idle peers are disconnected after maxIdleInterval
55 lines
1.2 KiB
Bash
55 lines
1.2 KiB
Bash
#!/bin/bash
|
|
echo "TEST sync/00:"
|
|
echo " two nodes that sync (no swap and do not have any funds)"
|
|
echo " can be in sync content with each other"
|
|
|
|
dir=`dirname $0`
|
|
source $dir/../test.sh
|
|
|
|
mkdir -p /tmp/swarm-test-files
|
|
FILE_00=/tmp/swarm-test-files/00
|
|
FILE_01=/tmp/swarm-test-files/01
|
|
FILE_02=/tmp/swarm-test-files/02
|
|
FILE_03=/tmp/swarm-test-files/03
|
|
FILE_04=/tmp/swarm-test-files/04
|
|
|
|
for f in $FILE_00 $FILE_01 $FILE_02 $FILE_03 $FILE_04; do
|
|
randomfile 20 > $f
|
|
done
|
|
# options="--verbosity=0 --vmodule=swarm/network/*=6,common/chequebook/*=6,common/swap/*=6,common/kademlia/*=5"
|
|
|
|
key=/tmp/key
|
|
swarm init 2 $options
|
|
swarm info 00
|
|
swarm info 01
|
|
swarm up 00 $FILE_00|tail -n1 > $key
|
|
swarm needs 00 $key $FILE_00
|
|
# sleep $wait
|
|
swarm needs 01 $key $FILE_00
|
|
swarm stop 01
|
|
|
|
|
|
swarm up 00 $FILE_01|tail -n1 > $key
|
|
swarm needs 00 $key $FILE_01
|
|
swarm start 01 $options
|
|
swarm needs 01 $key $FILE_01
|
|
|
|
swarm up 00 $FILE_02|tail -n1 > $key
|
|
swarm needs 00 $key $FILE_02
|
|
swarm needs 01 $key $FILE_02
|
|
|
|
swarm up 01 $FILE_03|tail -n1 > $key
|
|
swarm needs 01 $key $FILE_03
|
|
swarm needs 00 $key $FILE_03
|
|
|
|
swarm stop 00
|
|
swarm up 01 $FILE_04|tail -n1 > $key
|
|
swarm needs 01 $key $FILE_04
|
|
swarm start 00
|
|
sleep $wait
|
|
swarm needs 00 $key $FILE_04
|
|
|
|
swarm stop all
|
|
|
|
|
|
|