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