Skip to content
Permalink
Browse files

remove check before apply

  • Loading branch information...
thanhson1085 committed Nov 23, 2018
1 parent 531e188 commit 6d52cd7f954063ea2861d0f799c90e67d19a8b19
Showing with 3 additions and 12 deletions.
  1. +3 −12 apply.sh
@@ -9,16 +9,7 @@ echo $chainBlockNumber
echo $nodeBlockNumber

if [ "${chainBlockNumber}" == "${nodeBlockNumber}" ]; then
# store the whole response with the status at the and
HTTP_RESPONSE=$(curl --silent --write-out "HTTPSTATUS:%{http_code}" -X GET ${TOMOMASTER}/api/candidates/${COINBASE_ADDRESS}/isCandidate)

# extract the body
HTTP_BODY=$(echo $HTTP_RESPONSE | sed -e 's/HTTPSTATUS\:.*//g')


if [ "${HTTP_BODY}" != "1" ]; then
curl --header "Content-Type: application/json" \
--request POST \
"${TOMOMASTER}/api/candidates/apply?key=${OWNER_PRIVATE_KEY}&coinbase=${COINBASE_ADDRESS}&name=${NODE_NAME}"
fi
curl --header "Content-Type: application/json" \
--request POST \
"${TOMOMASTER}/api/candidates/apply?key=${OWNER_PRIVATE_KEY}&coinbase=${COINBASE_ADDRESS}&name=${NODE_NAME}"
fi

0 comments on commit 6d52cd7

Please sign in to comment.
You can’t perform that action at this time.