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

update config

parent cf531070
......@@ -132,10 +132,10 @@ function start() {
${CLI} block last_header
${CLI} net info
${CLI} net peer_info
${CLI} net peer
local count=1000
while [ $count -gt 0 ]; do
peersCount=$(${CLI} net peer_info | jq '.[] | length')
peersCount=$(${CLI} net peer | jq '.[] | length')
if [ "${peersCount}" -ge 2 ]; then
break
fi
......
......@@ -111,12 +111,12 @@ function start() {
${CLI} block last_header
${CLI} net info
${CLI} net peer_info
peersCount=$(${CLI} net peer_info | jq '.[] | length')
${CLI} net peer
peersCount=$(${CLI} net peer | jq '.[] | length')
echo "${peersCount}"
if [ "${peersCount}" -lt 2 ]; then
sleep 20
peersCount=$(${CLI} net peer_info | jq '.[] | length')
peersCount=$(${CLI} net peer | jq '.[] | length')
echo "${peersCount}"
if [ "${peersCount}" -lt 2 ]; then
echo "peers error"
......@@ -738,7 +738,7 @@ function peersCount() {
needCount=$3
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}"
if [ "${peersCount}" = "$needCount" ]; then
echo "============= 符合节点数要求 ============="
......@@ -795,7 +795,7 @@ function checkBlockHashfun() {
fi
fi
peersCount=0
peersCount=$(${forkContainers[0]} net peer_info | jq '.[] | length')
peersCount=$(${forkContainers[0]} net peer | jq '.[] | length')
printf '第 %d 次,未查询到网络同步,当前节点数 %d 个,100s后查询\n' $j "${peersCount}"
sleep 100
#检查是否超过了最大检测次数
......
......@@ -100,7 +100,7 @@ function peersCount() {
sleepTime=15
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}"
if [ "${peersCount}" = "$needCount" ]; then
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