Commit 5a0b57b3 authored by 张振华's avatar 张振华

update

parents a70c378e d19a436b
...@@ -10,13 +10,14 @@ import ( ...@@ -10,13 +10,14 @@ import (
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
"github.com/33cn/chain33/types"
"reflect" "reflect"
"runtime/debug" "runtime/debug"
"sync" "sync"
"sync/atomic" "sync/atomic"
"time" "time"
"github.com/33cn/chain33/types"
"github.com/33cn/chain33/common/crypto" "github.com/33cn/chain33/common/crypto"
dpostype "github.com/33cn/plugin/plugin/consensus/dpos/types" dpostype "github.com/33cn/plugin/plugin/consensus/dpos/types"
ttypes "github.com/33cn/plugin/plugin/consensus/dpos/types" ttypes "github.com/33cn/plugin/plugin/consensus/dpos/types"
......
...@@ -8,11 +8,12 @@ import ( ...@@ -8,11 +8,12 @@ import (
"bytes" "bytes"
"encoding/hex" "encoding/hex"
"fmt" "fmt"
"github.com/33cn/chain33/common/address"
"github.com/33cn/chain33/util"
"strings" "strings"
"time" "time"
"github.com/33cn/chain33/common/address"
"github.com/33cn/chain33/util"
"github.com/33cn/chain33/common/crypto" "github.com/33cn/chain33/common/crypto"
"github.com/33cn/chain33/common/log/log15" "github.com/33cn/chain33/common/log/log15"
"github.com/33cn/chain33/common/merkle" "github.com/33cn/chain33/common/merkle"
......
package dpos package dpos
import ( import (
"github.com/stretchr/testify/assert"
"testing" "testing"
"time" "time"
"github.com/stretchr/testify/assert"
) )
func TestTicker(t *testing.T) { func TestTicker(t *testing.T) {
......
...@@ -18,9 +18,13 @@ It has these top-level messages: ...@@ -18,9 +18,13 @@ It has these top-level messages:
*/ */
package types package types
import proto "github.com/golang/protobuf/proto" import (
import fmt "fmt" fmt "fmt"
import math "math"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal var _ = proto.Marshal
......
package types package types
import ( import (
"os"
"testing"
"github.com/33cn/chain33/common/crypto" "github.com/33cn/chain33/common/crypto"
"github.com/33cn/chain33/types" "github.com/33cn/chain33/types"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"os"
"testing"
) )
const ( const (
......
...@@ -5,16 +5,17 @@ import ( ...@@ -5,16 +5,17 @@ import (
"encoding/hex" "encoding/hex"
"encoding/json" "encoding/json"
"fmt" "fmt"
"github.com/33cn/chain33/common/crypto"
"github.com/33cn/chain33/types"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"io" "io"
"os" "os"
"sort" "sort"
"strings" "strings"
"testing" "testing"
"time" "time"
"github.com/33cn/chain33/common/crypto"
"github.com/33cn/chain33/types"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
) )
const ( const (
......
...@@ -9,10 +9,11 @@ import ( ...@@ -9,10 +9,11 @@ import (
"encoding/json" "encoding/json"
"errors" "errors"
"fmt" "fmt"
"github.com/33cn/chain33/common/address"
"io" "io"
"time" "time"
"github.com/33cn/chain33/common/address"
"github.com/33cn/chain33/common/crypto" "github.com/33cn/chain33/common/crypto"
"github.com/33cn/chain33/common/log/log15" "github.com/33cn/chain33/common/log/log15"
) )
......
...@@ -2,6 +2,7 @@ package types ...@@ -2,6 +2,7 @@ package types
import ( import (
"encoding/json" "encoding/json"
"github.com/33cn/chain33/common/crypto" "github.com/33cn/chain33/common/crypto"
"github.com/33cn/chain33/types" "github.com/33cn/chain33/types"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
......
...@@ -3,14 +3,15 @@ package types ...@@ -3,14 +3,15 @@ package types
import ( import (
"bytes" "bytes"
"fmt" "fmt"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"os" "os"
"os/signal" "os/signal"
"strings" "strings"
"sync" "sync"
"testing" "testing"
"time" "time"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
) )
func init() { func init() {
......
...@@ -4,12 +4,13 @@ import ( ...@@ -4,12 +4,13 @@ import (
"bytes" "bytes"
"encoding/hex" "encoding/hex"
"fmt" "fmt"
"strings"
"testing"
"github.com/33cn/chain33/common/crypto" "github.com/33cn/chain33/common/crypto"
"github.com/33cn/chain33/types" "github.com/33cn/chain33/types"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"strings"
"testing"
) )
const ( const (
......
...@@ -8,6 +8,7 @@ import ( ...@@ -8,6 +8,7 @@ import (
"bytes" "bytes"
"encoding/json" "encoding/json"
"fmt" "fmt"
"github.com/33cn/chain33/common/address" "github.com/33cn/chain33/common/address"
ttypes "github.com/33cn/plugin/plugin/consensus/dpos/types" ttypes "github.com/33cn/plugin/plugin/consensus/dpos/types"
dty "github.com/33cn/plugin/plugin/dapp/dposvote/types" dty "github.com/33cn/plugin/plugin/dapp/dposvote/types"
......
...@@ -3,6 +3,7 @@ package dpos ...@@ -3,6 +3,7 @@ package dpos
import ( import (
"bytes" "bytes"
"encoding/hex" "encoding/hex"
"github.com/33cn/chain33/common/crypto" "github.com/33cn/chain33/common/crypto"
"github.com/33cn/chain33/types" "github.com/33cn/chain33/types"
ttypes "github.com/33cn/plugin/plugin/consensus/dpos/types" ttypes "github.com/33cn/plugin/plugin/consensus/dpos/types"
......
...@@ -10,12 +10,13 @@ import ( ...@@ -10,12 +10,13 @@ import (
"encoding/hex" "encoding/hex"
"encoding/json" "encoding/json"
"fmt" "fmt"
"github.com/33cn/chain33/common/crypto"
"math/rand" "math/rand"
"strconv" "strconv"
"strings" "strings"
"time" "time"
"github.com/33cn/chain33/common/crypto"
vrf "github.com/33cn/chain33/common/vrf/secp256k1" vrf "github.com/33cn/chain33/common/vrf/secp256k1"
jsonrpc "github.com/33cn/chain33/rpc/jsonclient" jsonrpc "github.com/33cn/chain33/rpc/jsonclient"
rpctypes "github.com/33cn/chain33/rpc/types" rpctypes "github.com/33cn/chain33/rpc/types"
......
...@@ -8,6 +8,9 @@ import ( ...@@ -8,6 +8,9 @@ import (
"bytes" "bytes"
"encoding/hex" "encoding/hex"
"fmt" "fmt"
"sort"
"strings"
"github.com/33cn/chain33/account" "github.com/33cn/chain33/account"
"github.com/33cn/chain33/common" "github.com/33cn/chain33/common"
"github.com/33cn/chain33/common/db" "github.com/33cn/chain33/common/db"
...@@ -15,8 +18,6 @@ import ( ...@@ -15,8 +18,6 @@ import (
"github.com/33cn/chain33/system/dapp" "github.com/33cn/chain33/system/dapp"
"github.com/33cn/chain33/types" "github.com/33cn/chain33/types"
dty "github.com/33cn/plugin/plugin/dapp/dposvote/types" dty "github.com/33cn/plugin/plugin/dapp/dposvote/types"
"sort"
"strings"
) )
const ( const (
...@@ -99,7 +100,6 @@ func queryVrfByTime(kvdb db.KVDB, req *dty.DposVrfQuery) (types.Message, error) ...@@ -99,7 +100,6 @@ func queryVrfByTime(kvdb db.KVDB, req *dty.DposVrfQuery) (types.Message, error)
return queryVrfByCycle(kvdb, req) return queryVrfByCycle(kvdb, req)
} }
func getJSONVrfs(vrfs []*dty.VrfInfo) []*dty.JSONVrfInfo { func getJSONVrfs(vrfs []*dty.VrfInfo) []*dty.JSONVrfInfo {
var jsonVrfs []*dty.JSONVrfInfo var jsonVrfs []*dty.JSONVrfInfo
for i := 0; i < len(vrfs); i++ { for i := 0; i < len(vrfs); i++ {
......
...@@ -6,6 +6,7 @@ package executor ...@@ -6,6 +6,7 @@ package executor
import ( import (
"fmt" "fmt"
"github.com/33cn/chain33/types" "github.com/33cn/chain33/types"
dty "github.com/33cn/plugin/plugin/dapp/dposvote/types" dty "github.com/33cn/plugin/plugin/dapp/dposvote/types"
) )
......
This diff is collapsed.
...@@ -5,6 +5,7 @@ import ( ...@@ -5,6 +5,7 @@ import (
"encoding/hex" "encoding/hex"
"encoding/json" "encoding/json"
"fmt" "fmt"
"github.com/33cn/chain33/common/crypto" "github.com/33cn/chain33/common/crypto"
ttypes "github.com/33cn/plugin/plugin/consensus/dpos/types" ttypes "github.com/33cn/plugin/plugin/consensus/dpos/types"
) )
......
This diff is collapsed.
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