You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.2 KiB

  1. #! /bin/bash
  2. cd $GOPATH/src/github.com/tendermint/tendermint
  3. # specify a dir to copy
  4. # NOTE: eventually we should replace with `tendermint init --test`
  5. DIR=$HOME/.tendermint_test/consensus_state_test
  6. # XXX: remove tendermint dir
  7. rm -rf $HOME/.tendermint
  8. cp -r $DIR $HOME/.tendermint
  9. function reset(){
  10. rm -rf $HOME/.tendermint/data
  11. tendermint unsafe_reset_priv_validator
  12. }
  13. reset
  14. # empty block
  15. tendermint node --proxy_app=dummy &> /dev/null &
  16. sleep 5
  17. killall tendermint
  18. sed '/HEIGHT: 2/Q' ~/.tendermint/data/cs.wal/wal > consensus/test_data/empty_block.cswal
  19. reset
  20. # small block 1
  21. bash scripts/txs/random.sh 1000 36657 &> /dev/null &
  22. PID=$!
  23. tendermint node --proxy_app=dummy &> /dev/null &
  24. sleep 5
  25. killall tendermint
  26. kill -9 $PID
  27. sed '/HEIGHT: 2/Q' ~/.tendermint/data/cs.wal/wal > consensus/test_data/small_block1.cswal
  28. reset
  29. # small block 2 (part size = 512)
  30. echo "" >> ~/.tendermint/config.toml
  31. echo "block_part_size = 512" >> ~/.tendermint/config.toml
  32. bash scripts/txs/random.sh 1000 36657 &> /dev/null &
  33. PID=$!
  34. tendermint node --proxy_app=dummy &> /dev/null &
  35. sleep 5
  36. killall tendermint
  37. kill -9 $PID
  38. sed '/HEIGHT: 2/Q' ~/.tendermint/data/cs.wal/wal > consensus/test_data/small_block2.cswal
  39. reset