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.

23 lines
482 B

  1. #! /bin/bash
  2. set -u
  3. # wait till node is up, send txs
  4. ADDR=$1 #="127.0.0.1:26657"
  5. curl -s $ADDR/status > /dev/null
  6. ERR=$?
  7. while [ "$ERR" != 0 ]; do
  8. sleep 1
  9. curl -s $ADDR/status > /dev/null
  10. ERR=$?
  11. done
  12. # send a bunch of txs over a few blocks
  13. echo "Node is up, sending txs"
  14. for i in $(seq 1 5); do
  15. for _ in $(seq 1 100); do
  16. tx=$(head -c 8 /dev/urandom | hexdump -ve '1/1 "%.2X"')
  17. curl -s "$ADDR/broadcast_tx_async?tx=0x$tx" &> /dev/null
  18. done
  19. echo "sent 100"
  20. sleep 1
  21. done