github.com/aergoio/aergo@v1.3.1/consensus/impl/raftv2/test/generate_tx.sh (about) 1 #!/usr/bin/env bash 2 3 if [ $# != 2 ];then 4 echo "Usage: $0 port txPerAcc" 5 exit 100 6 fi 7 8 port=$1 9 if [ "$port" == "" ]; then 10 port=10001 11 fi 12 13 txPerAcc=$2 14 if [ "$txPerAcc" == "" ]; then 15 txPerAcc=1000 16 fi 17 18 accountNum=10 19 20 rm -rf ./*.txt ./$port ./*.tmp 21 22 23 echo "================ generate txs acc=$accountNum txs=$txPerAcc ===============" 24 25 server_dir=$TEST_RAFT_INSTANCE 26 27 genesis_wallet=$(cat $server_dir/genesis_wallet.txt) 28 echo "my genesis wallet=$genesis_wallet" 29 if [ "$genesis_wallet" = "" ]; then 30 echo "genesis_wallet is empty" 31 exit 100 32 fi 33 34 35 sign_tx.sh ${port} $accountNum $txPerAcc 36 seed_tx.sh $port $genesis_wallet 1 37 38 sleep 5