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
4daf4270
Commit
4daf4270
authored
Aug 29, 2019
by
mdj33
Committed by
vipwzw
Aug 29, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix ut
parent
e9bd0511
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
13 deletions
+14
-13
chain33.para.toml
chain33.para.toml
+1
-3
para.go
plugin/consensus/para/para.go
+2
-3
chain33.para.test.toml
plugin/dapp/paracross/cmd/build/chain33.para.test.toml
+5
-2
testcase.sh
plugin/dapp/paracross/cmd/build/testcase.sh
+3
-3
cfg.go
plugin/dapp/paracross/testnode/cfg.go
+3
-2
No files found.
chain33.para.toml
View file @
4daf4270
...
...
@@ -114,12 +114,10 @@ MainForkParacrossCommitTx=2270000
MainParaSelfConsensusForkHeight
=
-1
#主链开启循环检查共识交易done的fork高度
MainLoopCheckCommitTxDoneForkHeight
=
-1
#主链过滤平行链tx
FetchFilterParaTxsEnable
=
-1
#主链每隔几个没有相关平行链交易的区块,平行链上打包空区块,缺省从平行链blockHeight=0开始,依次增长,空块间隔不能为0
[[consensus.sub.para.emptyBlockInterval]]
blockHeight
=
0
interv
e
l
=
50
interv
a
l
=
50
...
...
plugin/consensus/para/para.go
View file @
4daf4270
...
...
@@ -140,7 +140,7 @@ func New(cfg *types.Consensus, sub []byte) queue.Module {
subcfg
.
BatchFetchBlockCount
=
types
.
MaxBlockCountPerTime
}
if
subcfg
.
BatchFetchBlockCount
>
types
.
MaxBlockCountPerTime
{
panic
(
fmt
.
Sprintf
(
"BatchFetchBlockCount=%d should be
more than
%d "
,
subcfg
.
BatchFetchBlockCount
,
types
.
MaxBlockCountPerTime
))
panic
(
fmt
.
Sprintf
(
"BatchFetchBlockCount=%d should be
<=
%d "
,
subcfg
.
BatchFetchBlockCount
,
types
.
MaxBlockCountPerTime
))
}
pk
,
err
:=
hex
.
DecodeString
(
minerPrivateKey
)
...
...
@@ -224,7 +224,6 @@ func New(cfg *types.Consensus, sub []byte) queue.Module {
if
subcfg
.
MultiDownServerRspTime
>
0
{
para
.
multiDldCli
.
serverTimeout
=
subcfg
.
MultiDownServerRspTime
}
c
.
SetChild
(
para
)
return
para
}
...
...
@@ -240,7 +239,7 @@ func checkEmptyBlockInterval(in []*emptyBlockInterval) error {
return
types
.
ErrInvalidParam
}
if
in
[
i
]
.
Interval
<=
0
{
plog
.
Error
(
"EmptyBlockInterval,interval should
big than
0"
,
"height"
,
in
[
i
]
.
BlockHeight
)
plog
.
Error
(
"EmptyBlockInterval,interval should
>
0"
,
"height"
,
in
[
i
]
.
BlockHeight
)
return
types
.
ErrInvalidParam
}
}
...
...
plugin/dapp/paracross/cmd/build/chain33.para.test.toml
View file @
4daf4270
...
...
@@ -95,8 +95,7 @@ ParaRemoteGrpcClient = "localhost:8802"
startHeight
=
20
#打包时间间隔,单位秒
writeBlockSeconds
=
2
#主链每隔几个没有相关交易的区块,平行链上打包空区块
emptyBlockInterval
=
4
MainBlockHashForkHeight
=
1
MainForkParacrossCommitTx
=
5
MainParaSelfConsensusForkHeight
=
300
...
...
@@ -107,6 +106,10 @@ authAccount="1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4"
waitBlocks4CommitMsg
=
2
#创世地址额度
genesisAmount
=
100000000
#主链每隔几个没有相关交易的区块,平行链上打包空区块
[[consensus.sub.para.emptyBlockInterval]]
blockHeight
=
0
interval
=
4
[store]
name
=
"mavl"
...
...
plugin/dapp/paracross/cmd/build/testcase.sh
View file @
4daf4270
...
...
@@ -36,13 +36,13 @@ function para_set_toml() {
sed
-i
$xsedfix
's/^Title.*/Title="user.p.'''
$PARANAME
'''."/g'
"
${
1
}
"
sed
-i
$xsedfix
's/^# TestNet=.*/TestNet=true/g'
"
${
1
}
"
sed
-i
$xsedfix
's/^startHeight=.*/startHeight=1/g'
"
${
1
}
"
sed
-i
$xsedfix
's/^emptyBlockInterval=.*/emptyBlockInterval=4/g'
"
${
1
}
"
sed
-i
$xsedfix
'/^emptyBlockInterval=.*/a MainBlockHashForkHeight=1'
"
${
1
}
"
sed
-i
$xsedfix
's/^interval=.*/interval=4/g'
"
${
1
}
"
sed
-i
$xsedfix
's/^MainForkParacrossCommitTx=.*/MainForkParacrossCommitTx=10/g'
"
${
1
}
"
sed
-i
$xsedfix
's/^MainParaSelfConsensusForkHeight=.*/MainParaSelfConsensusForkHeight=50/g'
"
${
1
}
"
sed
-i
$xsedfix
's/^MainLoopCheckCommitTxDoneForkHeight=.*/MainLoopCheckCommitTxDoneForkHeight='''
$MainLoopCheckForkHeight
'''/g'
"
${
1
}
"
sed
-i
$xsedfix
's/^FetchFilterParaTxsEnable=.*/FetchFilterParaTxsEnable=1/g'
"
${
1
}
"
sed
-i
$xsedfix
'/^MainForkParacrossCommitTx=.*/a MainBlockHashForkHeight=1'
"
${
1
}
"
# rpc
sed
-i
$xsedfix
's/^jrpcBindAddr=.*/jrpcBindAddr="0.0.0.0:8901"/g'
"
${
1
}
"
...
...
plugin/dapp/paracross/testnode/cfg.go
View file @
4daf4270
...
...
@@ -104,8 +104,6 @@ ParaRemoteGrpcClient=""
startHeight=1
#打包时间间隔,单位秒
writeBlockSeconds=2
#主链每隔几个没有相关交易的区块,平行链上打包空区块
emptyBlockInterval=2
#验证账户,验证节点需要配置自己的账户,并且钱包导入对应种子,非验证节点留空
authAccount="1EbDHAXpoiewjPLX9uqoz38HsKqMXayZrF"
#等待平行链共识消息在主链上链并成功的块数,超出会重发共识消息,最小是2
...
...
@@ -117,6 +115,9 @@ genesisAmount=100000000
MainBlockHashForkHeight=1
MainForkParacrossCommitTx=1
MainLoopCheckCommitTxDoneForkHeight=11
[[consensus.sub.para.emptyBlockInterval]]
blockHeight=0
interval=2
[store]
name="mavl"
...
...
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