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
0c345a62
Commit
0c345a62
authored
Apr 15, 2019
by
liuyuhang
Committed by
vipwzw
Apr 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify linter
parent
51335caa
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
14 deletions
+14
-14
round_state.go
plugin/consensus/tendermint/types/round_state.go
+3
-3
certutils.go
...rt/authority/tools/cryptogen/generator/utils/certutils.go
+6
-6
kvmvcc_mavl.go
plugin/store/kvmvccmavl/kvmvcc_mavl.go
+3
-3
kvmvcc_mavl_test.go
plugin/store/kvmvccmavl/kvmvcc_mavl_test.go
+2
-2
No files found.
plugin/consensus/tendermint/types/round_state.go
View file @
0c345a62
...
...
@@ -117,9 +117,9 @@ type RoundState struct {
// RoundStateMessage ...
func
(
rs
*
RoundState
)
RoundStateMessage
()
*
tmtypes
.
NewRoundStepMsg
{
return
&
tmtypes
.
NewRoundStepMsg
{
Height
:
rs
.
Height
,
Round
:
int32
(
rs
.
Round
),
Step
:
int32
(
rs
.
Step
),
Height
:
rs
.
Height
,
Round
:
int32
(
rs
.
Round
),
Step
:
int32
(
rs
.
Step
),
SecondsSinceStartTime
:
int32
(
time
.
Since
(
rs
.
StartTime
)
.
Seconds
()),
LastCommitRound
:
int32
(
rs
.
LastCommit
.
Round
()),
}
...
...
plugin/dapp/cert/authority/tools/cryptogen/generator/utils/certutils.go
View file @
0c345a62
...
...
@@ -73,9 +73,9 @@ func ParseX509CertificateToSm2(x509Cert *x509.Certificate) *sm2.Certificate {
UnknownExtKeyUsage
:
x509Cert
.
UnknownExtKeyUsage
,
BasicConstraintsValid
:
x509Cert
.
BasicConstraintsValid
,
IsCA
:
x509Cert
.
IsCA
,
MaxPathLen
:
x509Cert
.
MaxPathLen
,
MaxPathLenZero
:
x509Cert
.
MaxPathLenZero
,
IsCA
:
x509Cert
.
IsCA
,
MaxPathLen
:
x509Cert
.
MaxPathLen
,
MaxPathLenZero
:
x509Cert
.
MaxPathLenZero
,
SubjectKeyId
:
x509Cert
.
SubjectKeyId
,
AuthorityKeyId
:
x509Cert
.
AuthorityKeyId
,
...
...
@@ -136,9 +136,9 @@ func ParseSm2CertificateToX509(sm2Cert *sm2.Certificate) *x509.Certificate {
UnknownExtKeyUsage
:
sm2Cert
.
UnknownExtKeyUsage
,
BasicConstraintsValid
:
sm2Cert
.
BasicConstraintsValid
,
IsCA
:
sm2Cert
.
IsCA
,
MaxPathLen
:
sm2Cert
.
MaxPathLen
,
MaxPathLenZero
:
sm2Cert
.
MaxPathLenZero
,
IsCA
:
sm2Cert
.
IsCA
,
MaxPathLen
:
sm2Cert
.
MaxPathLen
,
MaxPathLenZero
:
sm2Cert
.
MaxPathLenZero
,
SubjectKeyId
:
sm2Cert
.
SubjectKeyId
,
AuthorityKeyId
:
sm2Cert
.
AuthorityKeyId
,
...
...
plugin/store/kvmvccmavl/kvmvcc_mavl.go
View file @
0c345a62
...
...
@@ -129,7 +129,7 @@ func New(cfg *types.Store, sub []byte) queue.Module {
isDelMavlData
=
true
}
// 查询是Upgrade是否需保存mavl
isUpgradeCommitMavl
=
isCommitMavl
(
bs
.
GetDB
())
isUpgradeCommitMavl
=
isCommitMavl
DB
(
bs
.
GetDB
())
bs
.
SetChild
(
kvms
)
return
kvms
...
...
@@ -270,7 +270,7 @@ func (kvmMavls *KVmMavlStore) MemSetUpgrade(datas *types.StoreSet, sync bool) ([
var
err
error
if
isUpgradeCommitMavl
{
hash
,
err
:
=
kvmMavls
.
MavlStore
.
MemSet
(
datas
,
sync
)
hash
,
err
=
kvmMavls
.
MavlStore
.
MemSet
(
datas
,
sync
)
if
err
!=
nil
{
return
hash
,
err
}
...
...
@@ -381,7 +381,7 @@ func setDelMavl(state int32) {
atomic
.
StoreInt32
(
&
delMavlDataState
,
state
)
}
func
isCommitMavl
(
db
dbm
.
DB
)
bool
{
func
isCommitMavl
DB
(
db
dbm
.
DB
)
bool
{
prefix
:=
[]
byte
(
leafNodePrefix
)
it
:=
db
.
Iterator
(
prefix
,
nil
,
true
)
defer
it
.
Close
()
...
...
plugin/store/kvmvccmavl/kvmvcc_mavl_test.go
View file @
0c345a62
...
...
@@ -720,12 +720,12 @@ func TestIsCommitMavl(t *testing.T) {
store
:=
New
(
storeCfg
,
nil
)
.
(
*
KVmMavlStore
)
assert
.
NotNil
(
t
,
store
)
isComm
:=
isCommitMavl
(
store
.
GetDB
())
isComm
:=
isCommitMavl
DB
(
store
.
GetDB
())
require
.
Equal
(
t
,
false
,
isComm
)
store
.
GetDB
()
.
Set
([]
byte
(
fmt
.
Sprintln
(
leafNodePrefix
,
"123"
)),
[]
byte
(
"v1"
))
store
.
GetDB
()
.
Set
([]
byte
(
fmt
.
Sprintln
(
leafNodePrefix
,
"456"
)),
[]
byte
(
"v2"
))
isComm
=
isCommitMavl
(
store
.
GetDB
())
isComm
=
isCommitMavl
DB
(
store
.
GetDB
())
require
.
Equal
(
t
,
true
,
isComm
)
}
...
...
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