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
71dcbc92
Commit
71dcbc92
authored
Jan 18, 2021
by
heyubin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add by hyb for test
parent
ade916bb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
raftPerf.go
plugin/consensus/raft/tools/raftPerf.go
+1
-1
tendermint_test.go
plugin/consensus/tendermint/tendermint_test.go
+9
-3
No files found.
plugin/consensus/raft/tools/raftPerf.go
View file @
71dcbc92
...
@@ -334,7 +334,7 @@ func NormPut(privkey string, key string, value string) {
...
@@ -334,7 +334,7 @@ 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
()
version
,
_
:=
mainClient
.
Version
(
context
.
Background
(),
nil
)
version
,
_
:=
c
.
Version
(
context
.
Background
(),
nil
)
tx
.
ChainID
=
version
.
ChainID
tx
.
ChainID
=
version
.
ChainID
tx
.
Sign
(
types
.
SECP256K1
,
getprivkey
(
privkey
))
tx
.
Sign
(
types
.
SECP256K1
,
getprivkey
(
privkey
))
...
...
plugin/consensus/tendermint/tendermint_test.go
View file @
71dcbc92
...
@@ -200,7 +200,10 @@ func AddNode() {
...
@@ -200,7 +200,10 @@ func AddNode() {
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
"valnode"
),
Payload
:
types
.
Encode
(
action
),
Fee
:
fee
}
tx
:=
&
types
.
Transaction
{
Execer
:
[]
byte
(
"valnode"
),
Payload
:
types
.
Encode
(
action
),
Fee
:
fee
}
tx
.
To
=
address
.
ExecAddress
(
"valnode"
)
tx
.
To
=
address
.
ExecAddress
(
"valnode"
)
tx
.
Nonce
=
r
.
Int63
()
tx
.
Nonce
=
r
.
Int63
()
tx
.
ChainID
=
c
.
Version
()
.
ChainID
version
,
_
:=
c
.
Version
(
context
.
Background
(),
nil
)
if
version
!=
nil
{
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
)
...
@@ -223,8 +226,11 @@ func ConfigManager() {
...
@@ -223,8 +226,11 @@ 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
()
version
,
_
:=
mainClient
.
Version
(
context
.
Background
(),
nil
)
version
,
_
:=
c
.
Version
(
context
.
Background
(),
nil
)
tx
.
ChainID
=
version
.
ChainID
if
version
!=
nil
{
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
)
...
...
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