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
7d2bc855
Commit
7d2bc855
authored
Nov 12, 2019
by
mdj33
Committed by
vipwzw
Nov 15, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code improve
parent
2d38ee7d
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
5 deletions
+17
-5
paracommitmsg.go
plugin/consensus/para/paracommitmsg.go
+1
-1
filtertxs.go
plugin/dapp/paracross/executor/filtertxs.go
+1
-1
stage.go
plugin/dapp/paracross/executor/stage.go
+1
-1
paracross.go
plugin/dapp/paracross/types/paracross.go
+1
-1
type.go
plugin/dapp/paracross/types/type.go
+13
-1
No files found.
plugin/consensus/para/paracommitmsg.go
View file @
7d2bc855
...
...
@@ -930,7 +930,7 @@ func parseSelfConsEnableStr(selfEnables []string) ([]*paraSelfConsEnable, error)
func
(
client
*
commitMsgClient
)
setSelfConsEnable
()
error
{
cfg
:=
client
.
paraClient
.
GetAPI
()
.
GetConfig
()
selfEnables
:=
types
.
Conf
(
cfg
,
"config.consensus.sub.para"
)
.
GStrList
(
"selfConsensEnablePreContract"
)
selfEnables
:=
types
.
Conf
(
cfg
,
pt
.
ParaPrefixConsSubConf
)
.
GStrList
(
pt
.
ParaSelfConsConfPreContract
)
list
,
err
:=
parseSelfConsEnableStr
(
selfEnables
)
if
err
!=
nil
{
return
err
...
...
plugin/dapp/paracross/executor/filtertxs.go
View file @
7d2bc855
...
...
@@ -60,7 +60,7 @@ func filterParaTxGroup(cfg *types.Chain33Config, tx *types.Transaction, allTxs [
endIdx
:=
headIdx
+
int
(
tx
.
GroupCount
)
for
i
:=
headIdx
;
i
<
endIdx
;
i
++
{
//缺省是在forkHeight之前与更老版本一致,不检查平行链交易,但有些特殊平行链6.2.0版本升级上来无更老版本且要求blockhash不变,则需与6.2.0保持一致,不检查
if
cfg
.
IsPara
()
&&
mainBlockHeight
<
forkHeight
&&
!
types
.
Conf
(
cfg
,
"config.consensus.sub.para"
)
.
IsEnable
(
"FilterIgnoreParaTxGroup"
)
{
if
cfg
.
IsPara
()
&&
mainBlockHeight
<
forkHeight
&&
!
types
.
Conf
(
cfg
,
pt
.
ParaPrefixConsSubConf
)
.
IsEnable
(
pt
.
ParaFilterIgnoreTxGroup
)
{
if
types
.
IsParaExecName
(
string
(
allTxs
[
i
]
.
Tx
.
Execer
))
{
continue
}
...
...
plugin/dapp/paracross/executor/stage.go
View file @
7d2bc855
...
...
@@ -137,7 +137,7 @@ func updateStages(db dbm.KV, stage *pt.SelfConsensStage) (*types.Receipt, error)
}
func
selfConsensInitStage
(
cfg
*
types
.
Chain33Config
)
*
types
.
Receipt
{
close
:=
cfg
.
IsEnable
(
"consensus.sub.para.paraSelfConsInitDisable"
)
close
:=
cfg
.
IsEnable
(
pt
.
ParaConsSubConf
+
"."
+
pt
.
ParaSelfConsInitConf
)
stage
:=
&
pt
.
SelfConsensStage
{
BlockHeight
:
0
,
Enable
:
pt
.
ParaConfigYes
}
if
close
{
stage
.
Enable
=
pt
.
ParaConfigNo
...
...
plugin/dapp/paracross/types/paracross.go
View file @
7d2bc855
...
...
@@ -354,7 +354,7 @@ func GetDappForkHeight(cfg *types.Chain33Config, forkKey string) int64 {
key
=
MainLoopCheckCommitTxDoneForkHeight
}
forkHeight
=
types
.
Conf
(
cfg
,
"config.consensus.sub.para"
)
.
GInt
(
key
)
forkHeight
=
types
.
Conf
(
cfg
,
ParaPrefixConsSubConf
)
.
GInt
(
key
)
if
forkHeight
<=
0
{
forkHeight
=
types
.
MaxHeight
}
...
...
plugin/dapp/paracross/types/type.go
View file @
7d2bc855
...
...
@@ -28,7 +28,19 @@ var (
ForkConsensSupportJump
=
"ForkConsensSupportJump"
// ForkParaSelfConsStages 平行链自共识分阶段共识
ForkParaSelfConsStages
=
"ForkParaSelfConsStages"
)
//para toml config params
// ParaConsSubConf sub
ParaConsSubConf
=
"consensus.sub.para"
//ParaPrefixConsSubConf prefix
ParaPrefixConsSubConf
=
"config."
+
ParaConsSubConf
//ParaSelfConsInitConf self stage init config
ParaSelfConsInitConf
=
"paraSelfConsInitDisable"
//ParaSelfConsConfPreContract self consens enable string as ["0-100"] config pre stage contract
ParaSelfConsConfPreContract
=
"selfConsensEnablePreContract"
//ParaFilterIgnoreTxGroup adapt 6.1.0 to check para tx in group
ParaFilterIgnoreTxGroup
=
"FilterIgnoreParaTxGroup"
)
func
init
()
{
// init executor type
...
...
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