Commit 4cc37abc authored by linj's avatar linj Committed by vipwzw

update config

parent cf531070
...@@ -132,10 +132,10 @@ function start() { ...@@ -132,10 +132,10 @@ function start() {
${CLI} block last_header ${CLI} block last_header
${CLI} net info ${CLI} net info
${CLI} net peer_info ${CLI} net peer
local count=1000 local count=1000
while [ $count -gt 0 ]; do while [ $count -gt 0 ]; do
peersCount=$(${CLI} net peer_info | jq '.[] | length') peersCount=$(${CLI} net peer | jq '.[] | length')
if [ "${peersCount}" -ge 2 ]; then if [ "${peersCount}" -ge 2 ]; then
break break
fi fi
......
...@@ -111,12 +111,12 @@ function start() { ...@@ -111,12 +111,12 @@ function start() {
${CLI} block last_header ${CLI} block last_header
${CLI} net info ${CLI} net info
${CLI} net peer_info ${CLI} net peer
peersCount=$(${CLI} net peer_info | jq '.[] | length') peersCount=$(${CLI} net peer | jq '.[] | length')
echo "${peersCount}" echo "${peersCount}"
if [ "${peersCount}" -lt 2 ]; then if [ "${peersCount}" -lt 2 ]; then
sleep 20 sleep 20
peersCount=$(${CLI} net peer_info | jq '.[] | length') peersCount=$(${CLI} net peer | jq '.[] | length')
echo "${peersCount}" echo "${peersCount}"
if [ "${peersCount}" -lt 2 ]; then if [ "${peersCount}" -lt 2 ]; then
echo "peers error" echo "peers error"
...@@ -738,7 +738,7 @@ function peersCount() { ...@@ -738,7 +738,7 @@ function peersCount() {
needCount=$3 needCount=$3
for ((i = 0; i < time; i++)); do for ((i = 0; i < time; i++)); do
peersCount=$($name net peer_info | jq '.[] | length') peersCount=$($name net peer | jq '.[] | length')
printf '查询节点 %s ,所需节点数 %d ,当前节点数 %s \n' "${name}" "${needCount}" "${peersCount}" printf '查询节点 %s ,所需节点数 %d ,当前节点数 %s \n' "${name}" "${needCount}" "${peersCount}"
if [ "${peersCount}" = "$needCount" ]; then if [ "${peersCount}" = "$needCount" ]; then
echo "============= 符合节点数要求 =============" echo "============= 符合节点数要求 ============="
...@@ -795,7 +795,7 @@ function checkBlockHashfun() { ...@@ -795,7 +795,7 @@ function checkBlockHashfun() {
fi fi
fi fi
peersCount=0 peersCount=0
peersCount=$(${forkContainers[0]} net peer_info | jq '.[] | length') peersCount=$(${forkContainers[0]} net peer | jq '.[] | length')
printf '第 %d 次,未查询到网络同步,当前节点数 %d 个,100s后查询\n' $j "${peersCount}" printf '第 %d 次,未查询到网络同步,当前节点数 %d 个,100s后查询\n' $j "${peersCount}"
sleep 100 sleep 100
#检查是否超过了最大检测次数 #检查是否超过了最大检测次数
......
...@@ -100,7 +100,7 @@ function peersCount() { ...@@ -100,7 +100,7 @@ function peersCount() {
sleepTime=15 sleepTime=15
for ((i = 0; i < retryTime; i++)); do for ((i = 0; i < retryTime; i++)); do
peersCount=$($name net peer_info | jq '.[] | length') peersCount=$($name net peer | jq '.[] | length')
printf '查询节点 %s ,所需节点数 %d ,当前节点数 %s \n' "${name}" "${needCount}" "${peersCount}" printf '查询节点 %s ,所需节点数 %d ,当前节点数 %s \n' "${name}" "${needCount}" "${peersCount}"
if [ "${peersCount}" = "$needCount" ]; then if [ "${peersCount}" = "$needCount" ]; then
echo "============= 符合节点数要求 =============" echo "============= 符合节点数要求 ============="
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment