test_fetch_blocks.sh 490 B

1234567891011121314151617181920212223242526272829303132
  1. #!/usr/bin/env bash
  2. # This script will fetch blocks for testing.
  3. # Importing useful functions for cc testing
  4. if [ -f ./func.sh ]; then
  5. source ./func.sh
  6. elif [ -f scripts/func.sh ]; then
  7. source scripts/func.sh
  8. fi
  9. org=1
  10. peer=0
  11. echo_b "=== Fetching blocks ==="
  12. for i in {0..6}
  13. do
  14. echo_b "Fetch block $i"
  15. channelFetch ${APP_CHANNEL} $org $peer $i
  16. done
  17. echo_g "Block fetching done!"
  18. for i in {0..1}
  19. do
  20. echo_b "Fetch block $i"
  21. channelFetch ${SYS_CHANNEL} $org $peer $i
  22. done
  23. exit 0