mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-31 04:01:55 +00:00
scripts/txs/random.sh
This commit is contained in:
19
scripts/txs/random.sh
Normal file
19
scripts/txs/random.sh
Normal file
@@ -0,0 +1,19 @@
|
||||
#! /bin/bash
|
||||
set -u
|
||||
|
||||
function toHex() {
|
||||
echo -n $1 | hexdump -ve '1/1 "%.2X"'
|
||||
}
|
||||
|
||||
N=$1
|
||||
PORT=$2
|
||||
|
||||
for i in `seq 1 $N`; do
|
||||
# store key value pair
|
||||
KEY="abcd$i"
|
||||
VALUE="dcba$i"
|
||||
echo "$KEY:$VALUE"
|
||||
curl 127.0.0.1:$PORT/broadcast_tx_sync?tx=\"$(toHex $KEY=$VALUE)\"
|
||||
done
|
||||
|
||||
|
Reference in New Issue
Block a user