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
e05d655b
Commit
e05d655b
authored
Jun 03, 2019
by
mdj33
Committed by
vipwzw
Jun 03, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added ci modify
parent
3752bba3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
15 deletions
+8
-15
paracommitmsg.go
plugin/consensus/para/paracommitmsg.go
+1
-1
testcase.sh
plugin/dapp/paracross/cmd/build/testcase.sh
+0
-0
superaccount.go
plugin/dapp/paracross/executor/superaccount.go
+7
-14
No files found.
plugin/consensus/para/paracommitmsg.go
View file @
e05d655b
...
@@ -19,7 +19,7 @@ import (
...
@@ -19,7 +19,7 @@ import (
var
(
var
(
consensusInterval
=
10
//about 1 new block interval
consensusInterval
=
10
//about 1 new block interval
minerInterval
=
25
//5s的主块间隔后分叉概率增加,25
s可以消除一些分叉回退
minerInterval
=
10
//5s的主块间隔后分叉概率增加,10
s可以消除一些分叉回退
)
)
type
commitMsgClient
struct
{
type
commitMsgClient
struct
{
...
...
plugin/dapp/paracross/cmd/build/testcase.sh
View file @
e05d655b
This diff is collapsed.
Click to expand it.
plugin/dapp/paracross/executor/superaccount.go
View file @
e05d655b
...
@@ -271,8 +271,7 @@ func (a *action) nodeJoin(config *pt.ParaNodeAddrConfig) (*types.Receipt, error)
...
@@ -271,8 +271,7 @@ func (a *action) nodeJoin(config *pt.ParaNodeAddrConfig) (*types.Receipt, error)
return
receipt
,
nil
return
receipt
,
nil
}
}
clog
.
Error
(
"nodeaccount.nodeJoin key exist"
,
"addr"
,
config
.
Addr
,
"status"
,
stat
)
return
nil
,
errors
.
Wrapf
(
pt
.
ErrParaNodeAddrExisted
,
"nodeAddr existed:%s,status:%d"
,
config
.
Addr
,
stat
.
Status
)
return
nil
,
pt
.
ErrParaNodeAddrExisted
}
}
...
@@ -649,8 +648,7 @@ func (a *action) nodeGroupCoinsActive(createAddr string, configCoinsFrozen int64
...
@@ -649,8 +648,7 @@ func (a *action) nodeGroupCoinsActive(createAddr string, configCoinsFrozen int64
func
(
a
*
action
)
nodeGroupApply
(
config
*
pt
.
ParaNodeGroupConfig
)
(
*
types
.
Receipt
,
error
)
{
func
(
a
*
action
)
nodeGroupApply
(
config
*
pt
.
ParaNodeGroupConfig
)
(
*
types
.
Receipt
,
error
)
{
addrs
:=
getConfigAddrs
(
config
.
Addrs
)
addrs
:=
getConfigAddrs
(
config
.
Addrs
)
if
len
(
addrs
)
==
0
{
if
len
(
addrs
)
==
0
{
clog
.
Error
(
"node group apply addrs null"
,
"addrs"
,
config
.
Addrs
)
return
nil
,
errors
.
Wrapf
(
types
.
ErrInvalidParam
,
"node group apply addrs null:%s"
,
config
.
Addrs
)
return
nil
,
types
.
ErrInvalidParam
}
}
receipt
:=
&
types
.
Receipt
{
Ty
:
types
.
ExecOk
}
receipt
:=
&
types
.
Receipt
{
Ty
:
types
.
ExecOk
}
...
@@ -711,8 +709,7 @@ func (a *action) nodeGroupQuit(config *pt.ParaNodeGroupConfig) (*types.Receipt,
...
@@ -711,8 +709,7 @@ func (a *action) nodeGroupQuit(config *pt.ParaNodeGroupConfig) (*types.Receipt,
//approved or quited
//approved or quited
if
status
.
Status
!=
pt
.
ParacrossNodeGroupApply
{
if
status
.
Status
!=
pt
.
ParacrossNodeGroupApply
{
clog
.
Error
(
"node group apply not apply"
,
"status"
,
status
.
Status
)
return
nil
,
errors
.
Wrapf
(
pt
.
ErrParaNodeGroupStatusWrong
,
"node group apply not apply:%d"
,
status
.
Status
)
return
nil
,
pt
.
ErrParaNodeGroupStatusWrong
}
}
applyAddrs
:=
strings
.
Split
(
status
.
TargetAddrs
,
","
)
applyAddrs
:=
strings
.
Split
(
status
.
TargetAddrs
,
","
)
...
@@ -747,8 +744,7 @@ func (a *action) nodeGroupApproveModify(config *pt.ParaNodeGroupConfig, modify *
...
@@ -747,8 +744,7 @@ func (a *action) nodeGroupApproveModify(config *pt.ParaNodeGroupConfig, modify *
//approve modify case
//approve modify case
if
modify
.
CoinsFrozen
<
config
.
CoinsFrozen
{
if
modify
.
CoinsFrozen
<
config
.
CoinsFrozen
{
clog
.
Error
(
"nodeGroupApprove id not enough coins"
,
"id.coins"
,
modify
.
CoinsFrozen
,
"config.coins"
,
config
.
CoinsFrozen
)
return
nil
,
errors
.
Wrapf
(
pt
.
ErrParaNodeGroupFrozenCoinsNotEnough
,
"id not enough coins modify:%d,config:%d"
,
modify
.
CoinsFrozen
,
config
.
CoinsFrozen
)
return
nil
,
pt
.
ErrParaNodeGroupFrozenCoinsNotEnough
}
}
receipt
:=
&
types
.
Receipt
{
Ty
:
types
.
ExecOk
}
receipt
:=
&
types
.
Receipt
{
Ty
:
types
.
ExecOk
}
...
@@ -784,8 +780,7 @@ func (a *action) nodeGroupApproveApply(config *pt.ParaNodeGroupConfig, apply *pt
...
@@ -784,8 +780,7 @@ func (a *action) nodeGroupApproveApply(config *pt.ParaNodeGroupConfig, apply *pt
}
}
if
apply
.
CoinsFrozen
<
config
.
CoinsFrozen
{
if
apply
.
CoinsFrozen
<
config
.
CoinsFrozen
{
clog
.
Error
(
"nodeGroupApprove id not enough coins"
,
"id.coins"
,
apply
.
CoinsFrozen
,
"config.coins"
,
config
.
CoinsFrozen
)
return
nil
,
errors
.
Wrapf
(
pt
.
ErrParaNodeGroupFrozenCoinsNotEnough
,
"id not enough coins apply:%d,config:%d"
,
apply
.
CoinsFrozen
,
config
.
CoinsFrozen
)
return
nil
,
pt
.
ErrParaNodeGroupFrozenCoinsNotEnough
}
}
receipt
:=
&
types
.
Receipt
{
Ty
:
types
.
ExecOk
}
receipt
:=
&
types
.
Receipt
{
Ty
:
types
.
ExecOk
}
...
@@ -814,8 +809,7 @@ func (a *action) nodeGroupApproveApply(config *pt.ParaNodeGroupConfig, apply *pt
...
@@ -814,8 +809,7 @@ func (a *action) nodeGroupApproveApply(config *pt.ParaNodeGroupConfig, apply *pt
// NodeGroupApprove super addr approve the node group apply
// NodeGroupApprove super addr approve the node group apply
func
(
a
*
action
)
nodeGroupApprove
(
config
*
pt
.
ParaNodeGroupConfig
)
(
*
types
.
Receipt
,
error
)
{
func
(
a
*
action
)
nodeGroupApprove
(
config
*
pt
.
ParaNodeGroupConfig
)
(
*
types
.
Receipt
,
error
)
{
if
!
isSuperManager
(
a
.
fromaddr
)
{
if
!
isSuperManager
(
a
.
fromaddr
)
{
clog
.
Error
(
"node group approve not super manager"
,
"addr"
,
a
.
fromaddr
)
return
nil
,
errors
.
Wrapf
(
types
.
ErrNotAllow
,
"node group approve not super manager:%s"
,
a
.
fromaddr
)
return
nil
,
types
.
ErrNotAllow
}
}
id
,
err
:=
getNodeGroupID
(
a
.
db
,
config
.
Id
)
id
,
err
:=
getNodeGroupID
(
a
.
db
,
config
.
Id
)
...
@@ -835,8 +829,7 @@ func (a *action) nodeGroupApprove(config *pt.ParaNodeGroupConfig) (*types.Receip
...
@@ -835,8 +829,7 @@ func (a *action) nodeGroupApprove(config *pt.ParaNodeGroupConfig) (*types.Receip
return
a
.
nodeGroupApproveApply
(
config
,
id
)
return
a
.
nodeGroupApproveApply
(
config
,
id
)
}
}
clog
.
Error
(
"nodeGroupApprove id wrong status"
,
"status"
,
id
.
Status
,
"id"
,
config
.
Id
)
return
nil
,
errors
.
Wrapf
(
pt
.
ErrParaNodeGroupStatusWrong
,
"nodeGroupApprove id wrong status:%d,id:%s"
,
id
.
Status
,
config
.
Id
)
return
nil
,
pt
.
ErrParaNodeGroupStatusWrong
}
}
...
...
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