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
0049c1ca
Commit
0049c1ca
authored
Apr 19, 2021
by
jiangpeng
Committed by
vipwzw
Apr 21, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adapt with chain33 crypto
parent
63d102c0
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
9 deletions
+9
-9
parablssign.go
plugin/consensus/para/parablssign.go
+1
-1
bls.go
plugin/crypto/bls/bls.go
+1
-1
authority_test.go
plugin/dapp/cert/authority/authority_test.go
+5
-5
ring_signature_crypto.go
plugin/dapp/privacy/crypto/ring_signature_crypto.go
+1
-1
exec.go
plugin/dapp/x2ethereum/executor/exec.go
+1
-1
No files found.
plugin/consensus/para/parablssign.go
View file @
0049c1ca
...
...
@@ -272,7 +272,7 @@ func (b *blsClient) checkCommitTx(txs []*types.Transaction) ([]*pt.ParacrossComm
var
commits
[]
*
pt
.
ParacrossCommitAction
for
_
,
tx
:=
range
txs
{
//验签
if
!
tx
.
CheckSign
()
{
if
!
tx
.
CheckSign
(
b
.
paraClient
.
GetCurrentHeight
()
)
{
return
nil
,
errors
.
Wrapf
(
types
.
ErrSign
,
"hash=%s"
,
common
.
ToHex
(
tx
.
Hash
()))
}
var
act
pt
.
ParacrossAction
...
...
plugin/crypto/bls/bls.go
View file @
0049c1ca
...
...
@@ -309,5 +309,5 @@ const Name = "bls"
const
ID
=
259
func
init
()
{
crypto
.
Register
(
Name
,
&
Driver
{},
crypto
.
WithOptionTypeID
(
ID
))
crypto
.
Register
(
Name
,
&
Driver
{},
crypto
.
With
Reg
OptionTypeID
(
ID
))
}
plugin/dapp/cert/authority/authority_test.go
View file @
0049c1ca
...
...
@@ -125,7 +125,7 @@ func TestChckSign(t *testing.T) {
}
cfg
.
SetMinFee
(
0
)
assert
.
Equal
(
t
,
true
,
tx1
.
CheckSign
())
assert
.
Equal
(
t
,
true
,
tx1
.
CheckSign
(
0
))
}
/**
...
...
@@ -140,7 +140,7 @@ func TestChckSigns(t *testing.T) {
cfg
.
SetMinFee
(
0
)
for
i
,
tx
:=
range
txs
{
if
!
tx
.
CheckSign
()
{
if
!
tx
.
CheckSign
(
0
)
{
t
.
Error
(
fmt
.
Sprintf
(
"error check tx[%d]"
,
i
+
1
))
return
}
...
...
@@ -178,7 +178,7 @@ func TestChckSignWithNoneAuth(t *testing.T) {
cfg
.
SetMinFee
(
0
)
tx14
.
Sign
(
types
.
SECP256K1
,
privKey
)
if
!
tx14
.
CheckSign
()
{
if
!
tx14
.
CheckSign
(
0
)
{
t
.
Error
(
"check signature failed"
)
return
}
...
...
@@ -203,7 +203,7 @@ func TestChckSignWithSm2(t *testing.T) {
cfg
.
SetMinFee
(
0
)
tx15
.
Sign
(
ct
.
AuthSM2
,
privKeysm2
)
if
!
tx15
.
CheckSign
()
{
if
!
tx15
.
CheckSign
(
0
)
{
t
.
Error
(
"check signature failed"
)
return
}
...
...
@@ -227,7 +227,7 @@ func TestChckSignWithEcdsa(t *testing.T) {
cfg
.
SetMinFee
(
0
)
tx16
.
Sign
(
ct
.
AuthECDSA
,
privKeyecdsa
)
if
!
tx16
.
CheckSign
()
{
if
!
tx16
.
CheckSign
(
0
)
{
t
.
Error
(
"check signature failed"
)
return
}
...
...
plugin/dapp/privacy/crypto/ring_signature_crypto.go
View file @
0049c1ca
...
...
@@ -21,7 +21,7 @@ import (
)
func
init
()
{
crypto
.
Register
(
privacytypes
.
SignNameRing
,
&
RingSignED25519
{},
crypto
.
WithOptionTypeID
(
privacytypes
.
RingBaseonED25519
))
crypto
.
Register
(
privacytypes
.
SignNameRing
,
&
RingSignED25519
{},
crypto
.
With
Reg
OptionTypeID
(
privacytypes
.
RingBaseonED25519
))
}
// RingSignature 环签名中对于crypto.Signature接口实现
...
...
plugin/dapp/x2ethereum/executor/exec.go
View file @
0049c1ca
...
...
@@ -166,7 +166,7 @@ func checkTxSignBySpecificAddr(tx *types.Transaction, addrs []string) error {
return
x2eTy
.
ErrInvalidAdminAddress
}
if
!
tx
.
CheckSign
()
{
if
!
tx
.
CheckSign
(
0
)
{
return
types
.
ErrSign
}
return
nil
...
...
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