docker-compose-files/hyperledger_fabric/v1.0.5/scripts/test_fetch_blocks.sh

33 lines
490 B
Bash
Raw Normal View History

2017-11-02 10:19:05 +08:00
#!/usr/bin/env bash
# This script will fetch blocks for testing.
# Importing useful functions for cc testing
if [ -f ./func.sh ]; then
source ./func.sh
elif [ -f scripts/func.sh ]; then
source scripts/func.sh
fi
2017-11-24 14:45:16 +08:00
org=1
peer=0
2017-11-02 10:19:05 +08:00
2017-11-15 14:46:12 +08:00
echo_b "=== Fetching blocks ==="
2017-11-02 10:19:05 +08:00
2017-12-01 23:11:37 +08:00
for i in {0..4}
2017-11-26 19:50:49 +08:00
do
echo_b "Fetch block $i"
2017-12-06 16:24:33 +08:00
channelFetch ${APP_CHANNEL} $org $peer $i
2017-11-26 19:50:49 +08:00
done
2017-12-01 23:11:37 +08:00
echo_g "Block fetching done!"
2017-12-02 09:36:01 +08:00
for i in {0..1}
2017-11-26 19:50:49 +08:00
do
echo_b "Fetch block $i"
2017-12-01 23:11:37 +08:00
channelFetch ${SYS_CHANNEL} $org $peer $i
2017-11-26 19:50:49 +08:00
done
2017-11-02 10:19:05 +08:00
2017-12-02 09:36:01 +08:00
exit 0