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
e7ab702d
Commit
e7ab702d
authored
Jul 19, 2019
by
vipwzw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto ci
parent
646855e3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
60 additions
and
70 deletions
+60
-70
kv.go
plugin/consensus/para/kv.go
+1
-2
para.go
plugin/consensus/para/para.go
+4
-4
parasync.go
plugin/consensus/para/parasync.go
+55
-64
No files found.
plugin/consensus/para/kv.go
View file @
e7ab702d
...
...
@@ -20,4 +20,4 @@ func calcTitleLastHeightKey(title string) []byte {
func
calcTitleFirstHeightKey
(
title
string
)
[]
byte
{
return
[]
byte
(
fmt
.
Sprintf
(
"%s-TFH-%s"
,
types
.
ConsensusParaTxsPrefix
,
title
))
}
\ No newline at end of file
}
plugin/consensus/para/para.go
View file @
e7ab702d
...
...
@@ -48,7 +48,7 @@ var (
mainBlockHashForkHeight
int64
=
209186
//calc block hash fork height in main chain
mainParaSelfConsensusForkHeight
int64
=
types
.
MaxHeight
//para chain self consensus height switch, must >= ForkParacrossCommitTx of main
mainForkParacrossCommitTx
int64
=
types
.
MaxHeight
//support paracross commit tx fork height in main chain: ForkParacrossCommitTx
localCacheCount
int64
=
1000
// local cache block max count
localCacheCount
int64
=
1000
// local cache block max count
batchFetchSeqEnable
bool
batchFetchSeqNum
int64
=
128
)
...
...
@@ -71,7 +71,7 @@ type client struct {
mtx
sync
.
Mutex
syncCaughtUpAtom
int32
localChangeAtom
int32
localChangeAtom
int32
}
type
subConfig
struct
{
...
...
@@ -87,7 +87,7 @@ type subConfig struct {
MainParaSelfConsensusForkHeight
int64
`json:"mainParaSelfConsensusForkHeight,omitempty"`
MainForkParacrossCommitTx
int64
`json:"mainForkParacrossCommitTx,omitempty"`
WaitConsensStopTimes
uint32
`json:"waitConsensStopTimes,omitempty"`
LocalCacheCount
int64
`json:"localCacheCount,omitempty"`
LocalCacheCount
int64
`json:"localCacheCount,omitempty"`
BatchFetchSeqEnable
uint32
`json:"batchFetchSeqEnable,omitempty"`
BatchFetchSeqNum
int64
`json:"batchFetchSeqNum,omitempty"`
}
...
...
@@ -260,7 +260,7 @@ func (client *client) InitBlock() {
}
// GetStartMainHash get StartMainHash in mainchain
func
(
client
*
client
)
GetStartMainHash
(
height
int64
)
([]
byte
)
{
func
(
client
*
client
)
GetStartMainHash
(
height
int64
)
[]
byte
{
if
height
<=
0
{
panic
(
fmt
.
Sprintf
(
"startHeight(%d) should be more than 0 in mainchain"
,
height
))
}
...
...
plugin/consensus/para/parasync.go
View file @
e7ab702d
This diff is collapsed.
Click to expand it.
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