github.com/aergoio/aergo@v1.3.1/consensus/impl/raftv2/test/commit_tx.sh (about)

     1  #!/bin/bash
     2  
     3  echo "=========== commit tx for all accounts =============="
     4  # 어떤 클라이언트
     5  port=$1
     6  TARGET_DIR=$2
     7  
     8  if [ "$port" = "" ];then
     9     port=10001
    10  fi
    11  
    12  if [ "$2" = "" ]; then
    13  	TARGET_DIR=$port
    14  fi
    15  
    16  echo "targetdir=$TARGET_DIR"
    17  
    18  # 계정 & 트랜잭션 삭제
    19  echo "start" 
    20  aergocli -p ${port} blockchain
    21  
    22  # 트랜잭션 컨펌
    23  for file in $TARGET_DIR/**/*.tmp; do
    24      echo $file " confirm .."
    25   
    26  	if [ "$file" = ".tmp" ]; then
    27  	 continue;
    28   	fi
    29  
    30  	aergocli -p ${port} committx --jsontxpath ${file}
    31  done
    32  
    33  echo "end"
    34  aergocli  -p ${port} blockchain