Unverified Commit bc6f78da authored by pengjun's avatar pengjun Committed by GitHub

Merge pull request #1 from mdj33/sleep_01s

sleep 0.1s
parents c94723e8 7cd23939
......@@ -37,9 +37,9 @@ chain33_BlockWait() {
break
fi
count=$((count + 1))
sleep 1
sleep 0.1
done
echo "wait new block $count s, cur height=$expect,old=$cur_height"
echo "wait new block $count/10 s, cur height=$expect,old=$cur_height"
}
chain33_QueryTx() {
......
......@@ -80,6 +80,8 @@ function base_init() {
sed -i $sedfix 's/^powLimitBits=.*/powLimitBits="0x1f2fffff"/g' chain33.toml
sed -i $sedfix 's/^targetTimePerBlock=.*/targetTimePerBlock=1/g' chain33.toml
sed -i $sedfix 's/^targetTimespan=.*/targetTimespan=10000000/g' chain33.toml
# p2p
sed -i $sedfix 's/^seeds=.*/seeds=["chain33:13802","chain32:13802","chain31:13802"]/g' chain33.toml
......@@ -131,13 +133,13 @@ function start() {
${CLI} net info
${CLI} net peer_info
local count=100
local count=1000
while [ $count -gt 0 ]; do
peersCount=$(${CLI} net peer_info | jq '.[] | length')
if [ "${peersCount}" -ge 2 ]; then
break
fi
sleep 5
sleep 1
((count--))
echo "peers error: peersCount=${peersCount}"
done
......@@ -212,10 +214,10 @@ function miner() {
sleep 1
echo "=========== # close auto mining ============="
result=$(${1} wallet auto_mine -f 0 | jq ".isok")
if [ "${result}" = "false" ]; then
exit 1
fi
#result=$(${1} wallet auto_mine -f 0 | jq ".isok")
#if [ "${result}" = "false" ]; then
# exit 1
#fi
}
function block_wait() {
......@@ -232,9 +234,9 @@ function block_wait() {
break
fi
count=$((count + 1))
sleep 1
sleep 0.1
done
echo "wait new block $count s, cur height=$expect,old=$cur_height"
echo "wait new block $count/10 s, cur height=$expect,old=$cur_height"
}
function block_wait2height() {
......@@ -257,9 +259,9 @@ function block_wait2height() {
break
fi
count=$((count + 1))
sleep 1
sleep 0.1
done
echo "wait new block $count s, cur_height=$new_height,expect=$expect"
echo "wait new block $count/10 s, cur_height=$new_height,expect=$expect"
}
function check_docker_status() {
......
......@@ -108,7 +108,7 @@ futureBlockTime = 16
ticketFrozenTime = 5 #5s only for test
ticketWithdrawTime = 10 #10s only for test
ticketMinerWaitTime = 2 #2s only for test
targetTimespan = 2304
targetTimespan=2304
targetTimePerBlock=16
[mver.consensus.ticket.ForkChainParamV1]
......@@ -116,14 +116,14 @@ futureBlockTime = 15
ticketFrozenTime = 43200
ticketWithdrawTime = 172800
ticketMinerWaitTime = 7200
targetTimespan = 2160
targetTimePerBlock = 15
targetTimespan=2160
targetTimePerBlock=15
[mver.consensus.ticket.ForkChainParamV2]
coinReward = 5
coinDevFund = 3
targetTimespan = 720
targetTimePerBlock = 5
targetTimespan=720
targetTimePerBlock=5
ticketPrice = 3000
......
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