Commit f27b8488 authored by 张振华's avatar 张振华

Merge branch 'dpos-v2' of https://github.com/zzh33cn/plugin into dpos-v2

parents cfafdcc5 4b0d5e13
......@@ -30,10 +30,9 @@ import (
"github.com/33cn/chain33/store"
"github.com/33cn/chain33/types"
ttypes "github.com/33cn/plugin/plugin/consensus/dpos/types"
dty "github.com/33cn/plugin/plugin/dapp/dposvote/types"
pty "github.com/33cn/plugin/plugin/dapp/norm/types"
"google.golang.org/grpc"
dty "github.com/33cn/plugin/plugin/dapp/dposvote/types"
_ "github.com/33cn/chain33/system"
_ "github.com/33cn/plugin/plugin/dapp/init"
......@@ -126,7 +125,7 @@ func DposPerf() {
for {
now = time.Now().Unix()
task = DecideTaskByTime(now)
if now < task.CycleStart + (task.CycleStop-task.CycleStart)/2 {
if now < task.CycleStart+(task.CycleStop-task.CycleStart)/2 {
break
}
time.Sleep(1 * time.Second)
......@@ -153,7 +152,7 @@ func DposPerf() {
for {
now = time.Now().Unix()
task = DecideTaskByTime(now)
if now > task.CycleStart + (task.CycleStop-task.CycleStart)/2 {
if now > task.CycleStart+(task.CycleStop-task.CycleStart)/2 {
break
}
time.Sleep(1 * time.Second)
......@@ -171,7 +170,7 @@ func DposPerf() {
}
time.Sleep(2 * time.Second)
vrfInfo, err = dposClient.csState.QueryVrf(pubkey, task.Cycle)
if err != nil || vrfInfo == nil{
if err != nil || vrfInfo == nil {
fmt.Println("QueryVrf failed")
} else {
fmt.Println("QueryVrf ok,", vrfInfo.Cycle, "|", len(vrfInfo.M), "|", len(vrfInfo.R), "|", len(vrfInfo.P))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment