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
b0d1ca85
Commit
b0d1ca85
authored
Jul 10, 2019
by
vipwzw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto ci
parent
493afe81
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
7 deletions
+4
-7
kv.go
plugin/consensus/para/kv.go
+2
-5
para.go
plugin/consensus/para/para.go
+2
-2
paradownload.go
plugin/consensus/para/paradownload.go
+0
-0
No files found.
plugin/consensus/para/kv.go
View file @
b0d1ca85
...
@@ -6,13 +6,10 @@ package para
...
@@ -6,13 +6,10 @@ package para
import
(
import
(
"fmt"
"fmt"
)
)
func
calcTitleHeightKey
(
title
string
,
height
int64
)
[]
byte
{
return
[]
byte
(
fmt
.
Sprintf
(
"TH-%s-%d"
,
title
,
height
))
func
calcTitleHeightKey
(
title
string
,
height
int64
)
[]
byte
{
return
[]
byte
(
fmt
.
Sprintf
(
"TH-%s-%d"
,
title
,
height
))
}
}
func
calcTitleLastHeightKey
(
title
string
)
[]
byte
{
func
calcTitleLastHeightKey
(
title
string
)
[]
byte
{
...
...
plugin/consensus/para/para.go
View file @
b0d1ca85
...
@@ -262,7 +262,7 @@ func (client *client) GetStartSeq(height int64) (int64, []byte) {
...
@@ -262,7 +262,7 @@ func (client *client) GetStartSeq(height int64) (int64, []byte) {
hint
.
Stop
()
hint
.
Stop
()
plog
.
Info
(
fmt
.
Sprintf
(
"lastHeight more than %d blocks after startHeight"
,
minBlockNum
),
"lastHeight"
,
lastHeight
,
"startHeight"
,
height
)
plog
.
Info
(
fmt
.
Sprintf
(
"lastHeight more than %d blocks after startHeight"
,
minBlockNum
),
"lastHeight"
,
lastHeight
,
"startHeight"
,
height
)
seq
,
hash
,
err
:=
client
.
GetSeqByHeightOnMainChain
(
height
-
1
)
seq
,
hash
,
err
:=
client
.
GetSeqByHeightOnMainChain
(
height
-
1
)
if
err
!=
nil
{
if
err
!=
nil
{
panic
(
err
)
panic
(
err
)
}
}
...
@@ -395,7 +395,7 @@ func (client *client) GetHashByHeightOnMainChain(height int64) ([]byte, error) {
...
@@ -395,7 +395,7 @@ func (client *client) GetHashByHeightOnMainChain(height int64) ([]byte, error) {
func
(
client
*
client
)
GetSeqByHashOnMainChain
(
hash
[]
byte
)
(
int64
,
error
)
{
func
(
client
*
client
)
GetSeqByHashOnMainChain
(
hash
[]
byte
)
(
int64
,
error
)
{
seq
,
err
:=
client
.
grpcClient
.
GetSequenceByHash
(
context
.
Background
(),
&
types
.
ReqHash
{
Hash
:
hash
})
seq
,
err
:=
client
.
grpcClient
.
GetSequenceByHash
(
context
.
Background
(),
&
types
.
ReqHash
{
Hash
:
hash
})
if
err
!=
nil
{
if
err
!=
nil
{
plog
.
Error
(
"GetSeqByHashOnMainChain"
,
"Error"
,
err
.
Error
(),
"hash"
,
hex
.
EncodeToString
(
hash
))
plog
.
Error
(
"GetSeqByHashOnMainChain"
,
"Error"
,
err
.
Error
(),
"hash"
,
hex
.
EncodeToString
(
hash
))
return
-
1
,
err
return
-
1
,
err
}
}
//the reflect checked in grpcHandle
//the reflect checked in grpcHandle
...
...
plugin/consensus/para/paradownload.go
View file @
b0d1ca85
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