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
724f7496
Commit
724f7496
authored
Sep 23, 2019
by
pengjun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#484 update dpos unit test
parent
c638029a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
dpos_test.go
plugin/consensus/dpos/dpos_test.go
+7
-7
ticker_test.go
plugin/consensus/dpos/ticker_test.go
+1
-1
test-rpc.sh
plugin/dapp/trade/cmd/build/test-rpc.sh
+1
-1
No files found.
plugin/consensus/dpos/dpos_test.go
View file @
724f7496
...
@@ -168,7 +168,7 @@ func DposPerf() {
...
@@ -168,7 +168,7 @@ func DposPerf() {
dposClient
:=
cs
.
(
*
Client
)
dposClient
:=
cs
.
(
*
Client
)
dposClient
.
csState
.
QueryCycleBoundaryInfo
(
task
.
Cycle
)
dposClient
.
csState
.
QueryCycleBoundaryInfo
(
task
.
Cycle
)
dposClient
.
csState
.
GetCBInfoByCircle
(
task
.
Cycle
)
//
dposClient.csState.GetCBInfoByCircle(task.Cycle)
dposClient
.
csState
.
QueryVrf
(
pubkey
,
task
.
Cycle
)
dposClient
.
csState
.
QueryVrf
(
pubkey
,
task
.
Cycle
)
dposClient
.
csState
.
QueryVrfs
(
dposClient
.
csState
.
validatorMgr
.
Validators
,
task
.
Cycle
)
dposClient
.
csState
.
QueryVrfs
(
dposClient
.
csState
.
validatorMgr
.
Validators
,
task
.
Cycle
)
dposClient
.
csState
.
GetVrfInfoByCircle
(
task
.
Cycle
,
VrfQueryTypeM
)
dposClient
.
csState
.
GetVrfInfoByCircle
(
task
.
Cycle
,
VrfQueryTypeM
)
...
@@ -200,12 +200,12 @@ func DposPerf() {
...
@@ -200,12 +200,12 @@ func DposPerf() {
fmt
.
Println
(
"Verify CB failed."
)
fmt
.
Println
(
"Verify CB failed."
)
}
}
fmt
.
Println
(
"=======start GetCBInfoByCircle!======="
)
//
fmt.Println("=======start GetCBInfoByCircle!=======")
//first time, not hit
//
//
first time, not hit
dposClient
.
csState
.
GetCBInfoByCircle
(
task
.
Cycle
)
//
dposClient.csState.GetCBInfoByCircle(task.Cycle)
time
.
Sleep
(
1
*
time
.
Second
)
//
time.Sleep(1 * time.Second)
//second time, hit cache
//
//
second time, hit cache
dposClient
.
csState
.
GetCBInfoByCircle
(
task
.
Cycle
)
//
dposClient.csState.GetCBInfoByCircle(task.Cycle)
fmt
.
Println
(
"=======start VoteVerify!======="
)
fmt
.
Println
(
"=======start VoteVerify!======="
)
vote
:=
generateVote
(
dposClient
.
csState
)
vote
:=
generateVote
(
dposClient
.
csState
)
...
...
plugin/consensus/dpos/ticker_test.go
View file @
724f7496
...
@@ -13,7 +13,7 @@ func TestTicker(t *testing.T) {
...
@@ -13,7 +13,7 @@ func TestTicker(t *testing.T) {
ticker
.
Start
()
ticker
.
Start
()
ti
:=
timeoutInfo
{
ti
:=
timeoutInfo
{
Duration
:
time
.
Second
*
time
.
Duration
(
2
),
Duration
:
time
.
Second
*
time
.
Duration
(
3
),
State
:
InitStateType
,
State
:
InitStateType
,
}
}
fmt
.
Println
(
"timeoutInfo:"
,
ti
.
String
())
fmt
.
Println
(
"timeoutInfo:"
,
ti
.
String
())
...
...
plugin/dapp/trade/cmd/build/test-rpc.sh
View file @
724f7496
...
@@ -325,7 +325,7 @@ function run_test() {
...
@@ -325,7 +325,7 @@ function run_test() {
trade_getSellOrder
trade_getSellOrder
trade_createBuyTx
trade_createBuyTx
trade_getBuyOrder
trade_getBuyOrder
#
trade_statusBuyOrder
trade_statusBuyOrder
trade_statusOrder
trade_statusOrder
trade_statusSellOrder
trade_statusSellOrder
...
...
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