Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
link33
plugin
Commits
7cd23939
Commit
7cd23939
authored
Sep 20, 2019
by
mdj33
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sleep 0.1s
parent
c94723e8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
17 deletions
+19
-17
dapp-test-common.sh
build/dapp-test-common.sh
+2
-2
docker-compose.sh
build/docker-compose.sh
+12
-10
chain33.toml
chain33.toml
+5
-5
No files found.
build/dapp-test-common.sh
View file @
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
()
{
...
...
build/docker-compose.sh
View file @
7cd23939
...
@@ -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
=
100
0
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
()
{
...
...
chain33.toml
View file @
7cd23939
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment