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
ec3026e1
Commit
ec3026e1
authored
Jan 18, 2021
by
heyubin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add by hyb for lint
parent
d4c248a9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
8 deletions
+22
-8
go.sum
go.sum
+5
-0
raftPerf.go
plugin/consensus/raft/tools/raftPerf.go
+2
-1
tendermint_test.go
plugin/consensus/tendermint/tendermint_test.go
+2
-1
privacy_test.go
plugin/dapp/privacy/wallet/privacy_test.go
+1
-1
relayd.go
plugin/dapp/relay/cmd/relayd/relayd/relayd.go
+1
-1
token_new_test.go
plugin/dapp/token/executor/token_new_test.go
+11
-4
No files found.
go.sum
View file @
ec3026e1
...
@@ -89,6 +89,7 @@ github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwc
...
@@ -89,6 +89,7 @@ github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwc
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davidlazar/go-crypto v0.0.0-20170701192655-dcfb0a7ac018 h1:6xT9KW8zLC5IlbaIF5Q7JNieBoACT7iW0YTxQHR0in0=
github.com/davidlazar/go-crypto v0.0.0-20170701192655-dcfb0a7ac018 h1:6xT9KW8zLC5IlbaIF5Q7JNieBoACT7iW0YTxQHR0in0=
github.com/davidlazar/go-crypto v0.0.0-20170701192655-dcfb0a7ac018/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4=
github.com/davidlazar/go-crypto v0.0.0-20170701192655-dcfb0a7ac018/go.mod h1:rQYf4tfk5sSwFsnDg3qYaBxSjsD9S8+59vW0dKUgme4=
...
@@ -543,6 +544,7 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
...
@@ -543,6 +544,7 @@ github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
github.com/prometheus/client_golang v0.9.2 h1:awm861/B8OKDd2I/6o1dy3ra4BamzKhYOiGItCeZ740=
github.com/prometheus/client_golang v0.9.2 h1:awm861/B8OKDd2I/6o1dy3ra4BamzKhYOiGItCeZ740=
...
@@ -594,11 +596,13 @@ github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZL
...
@@ -594,11 +596,13 @@ github.com/status-im/keycard-go v0.0.0-20190316090335-8537d3370df4/go.mod h1:RZL
github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8OR4w3TdeIHIh1g6EMY5p0gVNOovcWC+1vpc7naMuAw=
github.com/steakknife/bloomfilter v0.0.0-20180922174646-6819c0d2a570/go.mod h1:8OR4w3TdeIHIh1g6EMY5p0gVNOovcWC+1vpc7naMuAw=
github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3/go.mod h1:hpGUWaI9xL8pRQCTXQgocU38Qw1g0Us7n5PxxTwTCYU=
github.com/steakknife/hamming v0.0.0-20180906055917-c99c65617cd3/go.mod h1:hpGUWaI9xL8pRQCTXQgocU38Qw1g0Us7n5PxxTwTCYU=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1 h1:2vfRuCMp5sSVIDSqO8oNnWJq7mPa6KVP3iPIwFBuy8A=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ=
github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ=
github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d h1:gZZadD8H+fF+n9CmNhYL1Y0dJB+kLOmKd7FbPJLeGHs=
github.com/syndtr/goleveldb v1.0.1-0.20190923125748-758128399b1d h1:gZZadD8H+fF+n9CmNhYL1Y0dJB+kLOmKd7FbPJLeGHs=
...
@@ -797,6 +801,7 @@ gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHO
...
@@ -797,6 +801,7 @@ gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHO
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
...
...
plugin/consensus/raft/tools/raftPerf.go
View file @
ec3026e1
...
@@ -334,7 +334,8 @@ func NormPut(privkey string, key string, value string) {
...
@@ -334,7 +334,8 @@ func NormPut(privkey string, key string, value string) {
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
"norm"
),
Payload
:
types
.
Encode
(
action
),
Fee
:
fee
}
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
"norm"
),
Payload
:
types
.
Encode
(
action
),
Fee
:
fee
}
tx
.
To
=
address
.
ExecAddress
(
"norm"
)
tx
.
To
=
address
.
ExecAddress
(
"norm"
)
tx
.
Nonce
=
r
.
Int63
()
tx
.
Nonce
=
r
.
Int63
()
tx
.
ChainID
=
c
.
Version
()
.
ChainID
version
,
_
:=
c
.
Version
()
tx
.
ChainID
=
version
.
ChainID
tx
.
Sign
(
types
.
SECP256K1
,
getprivkey
(
privkey
))
tx
.
Sign
(
types
.
SECP256K1
,
getprivkey
(
privkey
))
reply
,
err
:=
c
.
SendTransaction
(
context
.
Background
(),
tx
)
reply
,
err
:=
c
.
SendTransaction
(
context
.
Background
(),
tx
)
...
...
plugin/consensus/tendermint/tendermint_test.go
View file @
ec3026e1
...
@@ -223,7 +223,8 @@ func ConfigManager() {
...
@@ -223,7 +223,8 @@ func ConfigManager() {
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
"manage"
),
Payload
:
types
.
Encode
(
modify
),
Fee
:
fee
}
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
"manage"
),
Payload
:
types
.
Encode
(
modify
),
Fee
:
fee
}
tx
.
To
=
address
.
ExecAddress
(
"manage"
)
tx
.
To
=
address
.
ExecAddress
(
"manage"
)
tx
.
Nonce
=
r
.
Int63
()
tx
.
Nonce
=
r
.
Int63
()
tx
.
ChainID
=
c
.
Version
()
.
ChainID
version
,
_
:=
c
.
Version
()
tx
.
ChainID
=
version
.
ChainID
tx
.
Sign
(
types
.
SECP256K1
,
getprivkey
(
"CC38546E9E659D15E6B4893F0AB32A06D103931A8230B0BDE71459D2B27D6944"
))
tx
.
Sign
(
types
.
SECP256K1
,
getprivkey
(
"CC38546E9E659D15E6B4893F0AB32A06D103931A8230B0BDE71459D2B27D6944"
))
reply
,
err
:=
c
.
SendTransaction
(
context
.
Background
(),
tx
)
reply
,
err
:=
c
.
SendTransaction
(
context
.
Background
(),
tx
)
...
...
plugin/dapp/privacy/wallet/privacy_test.go
View file @
ec3026e1
...
@@ -190,6 +190,7 @@ func (mock *PrivacyMock) CreateUTXOs(sender string, pubkeypair string, amount in
...
@@ -190,6 +190,7 @@ func (mock *PrivacyMock) CreateUTXOs(sender string, pubkeypair string, amount in
}
}
func
(
mock
*
PrivacyMock
)
createPublic2PrivacyTx
(
req
*
ty
.
ReqCreatePrivacyTx
)
*
types
.
Transaction
{
func
(
mock
*
PrivacyMock
)
createPublic2PrivacyTx
(
req
*
ty
.
ReqCreatePrivacyTx
)
*
types
.
Transaction
{
cfg
:=
mock
.
walletOp
.
GetAPI
()
.
GetConfig
()
viewPubSlice
,
spendPubSlice
,
err
:=
parseViewSpendPubKeyPair
(
req
.
GetPubkeypair
())
viewPubSlice
,
spendPubSlice
,
err
:=
parseViewSpendPubKeyPair
(
req
.
GetPubkeypair
())
if
err
!=
nil
{
if
err
!=
nil
{
return
nil
return
nil
...
@@ -219,7 +220,6 @@ func (mock *PrivacyMock) createPublic2PrivacyTx(req *ty.ReqCreatePrivacyTx) *typ
...
@@ -219,7 +220,6 @@ func (mock *PrivacyMock) createPublic2PrivacyTx(req *ty.ReqCreatePrivacyTx) *typ
To
:
address
.
ExecAddress
(
ty
.
PrivacyX
),
To
:
address
.
ExecAddress
(
ty
.
PrivacyX
),
ChainID
:
cfg
.
GetChainID
(),
ChainID
:
cfg
.
GetChainID
(),
}
}
cfg
:=
mock
.
walletOp
.
GetAPI
()
.
GetConfig
()
txSize
:=
types
.
Size
(
tx
)
+
ty
.
SignatureSize
txSize
:=
types
.
Size
(
tx
)
+
ty
.
SignatureSize
realFee
:=
int64
((
txSize
+
1023
)
>>
ty
.
Size1Kshiftlen
)
*
cfg
.
GetMinTxFeeRate
()
realFee
:=
int64
((
txSize
+
1023
)
>>
ty
.
Size1Kshiftlen
)
*
cfg
.
GetMinTxFeeRate
()
tx
.
Fee
=
realFee
tx
.
Fee
=
realFee
...
...
plugin/dapp/relay/cmd/relayd/relayd/relayd.go
View file @
ec3026e1
...
@@ -323,7 +323,7 @@ func (r *Relayd) transaction(payload []byte) *types.Transaction {
...
@@ -323,7 +323,7 @@ func (r *Relayd) transaction(payload []byte) *types.Transaction {
Payload
:
payload
,
Payload
:
payload
,
Nonce
:
rand
.
Int63
(),
Nonce
:
rand
.
Int63
(),
To
:
address
.
ExecAddress
(
ty
.
RelayX
),
To
:
address
.
ExecAddress
(
ty
.
RelayX
),
ChainID
:
r
.
config
.
Chain33Cfg
.
.
GetChainID
(),
ChainID
:
r
.
config
.
Chain33Cfg
.
GetChainID
(),
}
}
minFee
:=
types
.
DefaultMinFee
minFee
:=
types
.
DefaultMinFee
...
...
plugin/dapp/token/executor/token_new_test.go
View file @
ec3026e1
...
@@ -164,13 +164,14 @@ func TestPrecreate(t *testing.T) {
...
@@ -164,13 +164,14 @@ func TestPrecreate(t *testing.T) {
Ty
:
pty
.
TokenActionPreCreate
,
Ty
:
pty
.
TokenActionPreCreate
,
Value
:
&
pty
.
TokenAction_TokenPreCreate
{
TokenPreCreate
:
v
},
Value
:
&
pty
.
TokenAction_TokenPreCreate
{
TokenPreCreate
:
v
},
}
}
version
,
_
:=
mainClient
.
Version
(
context
.
Background
(),
nil
)
tx
:=
&
types
.
Transaction
{
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
execName
),
Execer
:
[]
byte
(
execName
),
Payload
:
types
.
Encode
(
precreate
),
Payload
:
types
.
Encode
(
precreate
),
Fee
:
feeForToken
,
Fee
:
feeForToken
,
Nonce
:
r
.
Int63
(),
Nonce
:
r
.
Int63
(),
To
:
address
.
ExecAddress
(
execName
),
To
:
address
.
ExecAddress
(
execName
),
ChainID
:
mainClient
.
Version
()
.
GetChainID
(),
ChainID
:
version
.
GetChainID
(),
}
}
tx
.
Sign
(
types
.
SECP256K1
,
privkey
)
tx
.
Sign
(
types
.
SECP256K1
,
privkey
)
...
@@ -206,13 +207,15 @@ func TestFinish(t *testing.T) {
...
@@ -206,13 +207,15 @@ func TestFinish(t *testing.T) {
Ty
:
pty
.
TokenActionFinishCreate
,
Ty
:
pty
.
TokenActionFinishCreate
,
Value
:
&
pty
.
TokenAction_TokenFinishCreate
{
TokenFinishCreate
:
v
},
Value
:
&
pty
.
TokenAction_TokenFinishCreate
{
TokenFinishCreate
:
v
},
}
}
version
,
_
:=
mainClient
.
Version
(
context
.
Background
(),
nil
)
tx
:=
&
types
.
Transaction
{
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
execName
),
Execer
:
[]
byte
(
execName
),
Payload
:
types
.
Encode
(
finish
),
Payload
:
types
.
Encode
(
finish
),
Fee
:
feeForToken
,
Fee
:
feeForToken
,
Nonce
:
r
.
Int63
(),
Nonce
:
r
.
Int63
(),
To
:
address
.
ExecAddress
(
execName
),
To
:
address
.
ExecAddress
(
execName
),
ChainID
:
mainClient
.
Version
()
.
GetChainID
(),
ChainID
:
version
.
GetChainID
(),
}
}
tx
.
Sign
(
types
.
SECP256K1
,
privkey
)
tx
.
Sign
(
types
.
SECP256K1
,
privkey
)
...
@@ -248,7 +251,9 @@ func TestTransferToken(t *testing.T) {
...
@@ -248,7 +251,9 @@ func TestTransferToken(t *testing.T) {
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
execName
),
Payload
:
types
.
Encode
(
transfer
),
Fee
:
fee
,
To
:
addrexec
}
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
execName
),
Payload
:
types
.
Encode
(
transfer
),
Fee
:
fee
,
To
:
addrexec
}
tx
.
Nonce
=
r
.
Int63
()
tx
.
Nonce
=
r
.
Int63
()
tx
.
ChainID
=
mainClient
.
Version
()
.
GetChainID
()
version
,
_
:=
mainClient
.
Version
(
context
.
Background
(),
nil
)
tx
.
ChainID
=
version
.
GetChainID
()
tx
.
Sign
(
types
.
SECP256K1
,
privkey
)
tx
.
Sign
(
types
.
SECP256K1
,
privkey
)
reply
,
err
:=
mainClient
.
SendTransaction
(
context
.
Background
(),
tx
)
reply
,
err
:=
mainClient
.
SendTransaction
(
context
.
Background
(),
tx
)
...
@@ -329,7 +334,9 @@ func TestTokenMint(t *testing.T) {
...
@@ -329,7 +334,9 @@ func TestTokenMint(t *testing.T) {
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
execName
),
Payload
:
types
.
Encode
(
transfer
),
Fee
:
fee
,
To
:
addrexec
}
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
execName
),
Payload
:
types
.
Encode
(
transfer
),
Fee
:
fee
,
To
:
addrexec
}
tx
.
Nonce
=
r
.
Int63
()
tx
.
Nonce
=
r
.
Int63
()
tx
.
ChainID
=
mainClient
.
Version
()
.
GetChainID
()
version
,
_
:=
mainClient
.
Version
(
context
.
Background
(),
nil
)
tx
.
ChainID
=
version
.
GetChainID
()
tx
.
Sign
(
types
.
SECP256K1
,
privkey
)
tx
.
Sign
(
types
.
SECP256K1
,
privkey
)
...
...
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