From d49a5166ac1c1bfb048851450e81f7181da38f4a Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Wed, 12 Jul 2017 01:05:21 -0400 Subject: [PATCH] scripts/txs: add 0x and randomness --- scripts/txs/random.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/txs/random.sh b/scripts/txs/random.sh index 742d981c2..231fabcfe 100644 --- a/scripts/txs/random.sh +++ b/scripts/txs/random.sh @@ -10,10 +10,10 @@ 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)\" + KEY=$(head -c 10 /dev/urandom) + VALUE="$i" + echo $(toHex $KEY=$VALUE) + curl 127.0.0.1:$PORT/broadcast_tx_sync?tx=0x$(toHex $KEY=$VALUE) done