Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support v2 version in go mod #1249

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .travis.script.bash
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ elif [ $TRAVIS_OS_NAME == 'osx' ]; then
env GO111MODULE=on make all
else
echo "win sys"
env GO111MODULE=on CGO_ENABLED=1 go build -ldflags "-X github.com/ontio/ontology/common/config.Version=${VERSION}" -o ontology-windows-amd64 main.go
env GO111MODULE=on go build -ldflags "-X github.com/ontio/ontology/common/config.Version=${VERSION}" -o sigsvr-windows-amd64 sigsvr.go
env GO111MODULE=on CGO_ENABLED=1 go build -ldflags "-X github.com/ontio/ontology/v2/common/config.Version=${VERSION}" -o ontology-windows-amd64 main.go
env GO111MODULE=on go build -ldflags "-X github.com/ontio/ontology/v2/common/config.Version=${VERSION}" -o sigsvr-windows-amd64 sigsvr.go
fi
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
GOFMT=gofmt
GC=go build
VERSION := $(shell git describe --always --tags --long)
BUILD_NODE_PAR = -ldflags "-w -X github.com/ontio/ontology/common/config.Version=$(VERSION)" #-race
BUILD_NODE_PAR = -ldflags "-w -X github.com/ontio/ontology/v2/common/config.Version=$(VERSION)" #-race

ARCH=$(shell uname -m)
DBUILD=docker build
Expand Down
6 changes: 3 additions & 3 deletions account/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ package account
import (
"github.com/ontio/ontology-crypto/keypair"
s "github.com/ontio/ontology-crypto/signature"
"github.com/ontio/ontology/common"
"github.com/ontio/ontology/common/log"
"github.com/ontio/ontology/core/types"
"github.com/ontio/ontology/v2/common"
"github.com/ontio/ontology/v2/common/log"
"github.com/ontio/ontology/v2/core/types"
)

/* crypto object */
Expand Down
2 changes: 1 addition & 1 deletion account/account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"os"
"testing"

"github.com/ontio/ontology/core/types"
"github.com/ontio/ontology/v2/core/types"
"github.com/stretchr/testify/assert"
)

Expand Down
4 changes: 2 additions & 2 deletions account/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import (

"github.com/ontio/ontology-crypto/keypair"
s "github.com/ontio/ontology-crypto/signature"
"github.com/ontio/ontology/common"
"github.com/ontio/ontology/core/types"
"github.com/ontio/ontology/v2/common"
"github.com/ontio/ontology/v2/core/types"
)

//Client of wallet
Expand Down
2 changes: 1 addition & 1 deletion account/file_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"os"

"github.com/ontio/ontology-crypto/keypair"
"github.com/ontio/ontology/common"
"github.com/ontio/ontology/v2/common"
)

/** AccountData - for wallet read and save, no crypto object included **/
Expand Down
2 changes: 1 addition & 1 deletion account/file_store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"testing"

"github.com/ontio/ontology-crypto/keypair"
"github.com/ontio/ontology/core/types"
"github.com/ontio/ontology/v2/core/types"
"github.com/stretchr/testify/assert"
)

Expand Down
2 changes: 1 addition & 1 deletion account/identity.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (

"github.com/itchyny/base58-go"
"github.com/ontio/ontology-crypto/keypair"
"github.com/ontio/ontology/core/types"
"github.com/ontio/ontology/v2/core/types"
"golang.org/x/crypto/ripemd160"
)

Expand Down
2 changes: 1 addition & 1 deletion account/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
package account

import (
"github.com/ontio/ontology/common"
"github.com/ontio/ontology/v2/common"
)

type ClientStore interface {
Expand Down
16 changes: 8 additions & 8 deletions cmd-tools/sigsvr/sigsvr.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ import (
"runtime"
"syscall"

"github.com/ontio/ontology/cmd"
"github.com/ontio/ontology/cmd/abi"
cmdsvr "github.com/ontio/ontology/cmd/sigsvr"
clisvrcom "github.com/ontio/ontology/cmd/sigsvr/common"
"github.com/ontio/ontology/cmd/sigsvr/store"
"github.com/ontio/ontology/cmd/utils"
"github.com/ontio/ontology/common/config"
"github.com/ontio/ontology/common/log"
"github.com/ontio/ontology/v2/cmd"
"github.com/ontio/ontology/v2/cmd/abi"
cmdsvr "github.com/ontio/ontology/v2/cmd/sigsvr"
clisvrcom "github.com/ontio/ontology/v2/cmd/sigsvr/common"
"github.com/ontio/ontology/v2/cmd/sigsvr/store"
"github.com/ontio/ontology/v2/cmd/utils"
"github.com/ontio/ontology/v2/common/config"
"github.com/ontio/ontology/v2/common/log"
"github.com/urfave/cli"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/abi/abi_mgr.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"io/ioutil"
"strings"

"github.com/ontio/ontology/common/log"
"github.com/ontio/ontology/v2/common/log"
)

var DefAbiMgr = NewAbiMgr()
Expand Down
6 changes: 3 additions & 3 deletions cmd/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ import (

"github.com/ontio/ontology-crypto/keypair"
s "github.com/ontio/ontology-crypto/signature"
"github.com/ontio/ontology/cmd/common"
"github.com/ontio/ontology/cmd/utils"
"github.com/ontio/ontology/common/config"
"github.com/ontio/ontology/v2/cmd/common"
"github.com/ontio/ontology/v2/cmd/utils"
"github.com/ontio/ontology/v2/common/config"
"github.com/urfave/cli"
)

Expand Down
10 changes: 5 additions & 5 deletions cmd/account_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ import (

"github.com/ontio/ontology-crypto/keypair"
"github.com/ontio/ontology-crypto/signature"
"github.com/ontio/ontology/account"
"github.com/ontio/ontology/cmd/common"
"github.com/ontio/ontology/cmd/utils"
"github.com/ontio/ontology/common/password"
"github.com/ontio/ontology/core/types"
"github.com/ontio/ontology/v2/account"
"github.com/ontio/ontology/v2/cmd/common"
"github.com/ontio/ontology/v2/cmd/utils"
"github.com/ontio/ontology/v2/common/password"
"github.com/ontio/ontology/v2/core/types"
"github.com/urfave/cli"
)

Expand Down
10 changes: 5 additions & 5 deletions cmd/asset_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ import (
"strconv"
"strings"

"github.com/ontio/ontology/account"
cmdcom "github.com/ontio/ontology/cmd/common"
"github.com/ontio/ontology/cmd/utils"
"github.com/ontio/ontology/common/config"
nutils "github.com/ontio/ontology/smartcontract/service/native/utils"
"github.com/ontio/ontology/v2/account"
cmdcom "github.com/ontio/ontology/v2/cmd/common"
"github.com/ontio/ontology/v2/cmd/utils"
"github.com/ontio/ontology/v2/common/config"
nutils "github.com/ontio/ontology/v2/smartcontract/service/native/utils"
"github.com/urfave/cli"
)

Expand Down
10 changes: 5 additions & 5 deletions cmd/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ import (
"fmt"
"strconv"

"github.com/ontio/ontology/account"
"github.com/ontio/ontology/cmd/utils"
"github.com/ontio/ontology/common"
"github.com/ontio/ontology/common/config"
"github.com/ontio/ontology/common/password"
"github.com/ontio/ontology/v2/account"
"github.com/ontio/ontology/v2/cmd/utils"
"github.com/ontio/ontology/v2/common"
"github.com/ontio/ontology/v2/common/config"
"github.com/ontio/ontology/v2/common/password"
"github.com/urfave/cli"
)

Expand Down
10 changes: 5 additions & 5 deletions cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ package cmd
import (
"fmt"

"github.com/ontio/ontology/cmd/utils"
"github.com/ontio/ontology/common"
"github.com/ontio/ontology/common/config"
"github.com/ontio/ontology/common/log"
"github.com/ontio/ontology/smartcontract/service/native/governance"
"github.com/ontio/ontology/v2/cmd/utils"
"github.com/ontio/ontology/v2/common"
"github.com/ontio/ontology/v2/common/config"
"github.com/ontio/ontology/v2/common/log"
"github.com/ontio/ontology/v2/smartcontract/service/native/governance"
"github.com/urfave/cli"
)

Expand Down
12 changes: 6 additions & 6 deletions cmd/contract_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ import (
"io/ioutil"
"strings"

cmdcom "github.com/ontio/ontology/cmd/common"
"github.com/ontio/ontology/cmd/utils"
"github.com/ontio/ontology/common"
"github.com/ontio/ontology/common/config"
"github.com/ontio/ontology/core/payload"
httpcom "github.com/ontio/ontology/http/base/common"
cmdcom "github.com/ontio/ontology/v2/cmd/common"
"github.com/ontio/ontology/v2/cmd/utils"
"github.com/ontio/ontology/v2/common"
"github.com/ontio/ontology/v2/common/config"
"github.com/ontio/ontology/v2/core/payload"
httpcom "github.com/ontio/ontology/v2/http/base/common"
"github.com/urfave/cli"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/export_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ import (
"github.com/gosuri/uiprogress"
"github.com/urfave/cli"

"github.com/ontio/ontology/cmd/utils"
"github.com/ontio/ontology/common/serialization"
"github.com/ontio/ontology/v2/cmd/utils"
"github.com/ontio/ontology/v2/common/serialization"
)

var ExportCommand = cli.Command{
Expand Down
16 changes: 8 additions & 8 deletions cmd/import_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ import (
"github.com/gosuri/uiprogress"
"github.com/urfave/cli"

"github.com/ontio/ontology/cmd/utils"
"github.com/ontio/ontology/common"
"github.com/ontio/ontology/common/config"
"github.com/ontio/ontology/common/log"
"github.com/ontio/ontology/common/serialization"
"github.com/ontio/ontology/core/genesis"
"github.com/ontio/ontology/core/ledger"
"github.com/ontio/ontology/core/types"
"github.com/ontio/ontology/v2/cmd/utils"
"github.com/ontio/ontology/v2/common"
"github.com/ontio/ontology/v2/common/config"
"github.com/ontio/ontology/v2/common/log"
"github.com/ontio/ontology/v2/common/serialization"
"github.com/ontio/ontology/v2/core/genesis"
"github.com/ontio/ontology/v2/core/ledger"
"github.com/ontio/ontology/v2/core/types"
)

var ImportCommand = cli.Command{
Expand Down
6 changes: 3 additions & 3 deletions cmd/info_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"fmt"
"strconv"

"github.com/ontio/ontology/cmd/utils"
"github.com/ontio/ontology/core/types"
httpcom "github.com/ontio/ontology/http/base/common"
"github.com/ontio/ontology/v2/cmd/utils"
"github.com/ontio/ontology/v2/core/types"
httpcom "github.com/ontio/ontology/v2/http/base/common"
"github.com/urfave/cli"
)

Expand Down
10 changes: 5 additions & 5 deletions cmd/sig_tx_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ import (
"strings"

"github.com/ontio/ontology-crypto/keypair"
cmdcom "github.com/ontio/ontology/cmd/common"
"github.com/ontio/ontology/cmd/utils"
"github.com/ontio/ontology/common"
"github.com/ontio/ontology/common/constants"
"github.com/ontio/ontology/core/types"
cmdcom "github.com/ontio/ontology/v2/cmd/common"
"github.com/ontio/ontology/v2/cmd/utils"
"github.com/ontio/ontology/v2/common"
"github.com/ontio/ontology/v2/common/constants"
"github.com/ontio/ontology/v2/core/types"
"github.com/urfave/cli"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/sigsvr/common/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"encoding/json"
"fmt"

"github.com/ontio/ontology/account"
"github.com/ontio/ontology/cmd/sigsvr/store"
"github.com/ontio/ontology/v2/account"
"github.com/ontio/ontology/v2/cmd/sigsvr/store"
)

var DefWalletStore *store.WalletStore
Expand Down
2 changes: 1 addition & 1 deletion cmd/sigsvr/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

package sigsvr

import "github.com/ontio/ontology/cmd/sigsvr/handlers"
import "github.com/ontio/ontology/v2/cmd/sigsvr/handlers"

func init() {
DefCliRpcSvr.RegHandler("createaccount", handlers.CreateAccount)
Expand Down
4 changes: 2 additions & 2 deletions cmd/sigsvr/handlers/create_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (

"github.com/ontio/ontology-crypto/keypair"
s "github.com/ontio/ontology-crypto/signature"
clisvrcom "github.com/ontio/ontology/cmd/sigsvr/common"
"github.com/ontio/ontology/common/log"
clisvrcom "github.com/ontio/ontology/v2/cmd/sigsvr/common"
"github.com/ontio/ontology/v2/common/log"
)

type CreateAccountReq struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/sigsvr/handlers/create_account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package handlers
import (
"testing"

clisvrcom "github.com/ontio/ontology/cmd/sigsvr/common"
clisvrcom "github.com/ontio/ontology/v2/cmd/sigsvr/common"
)

func TestCreateAccount(t *testing.T) {
Expand Down
8 changes: 4 additions & 4 deletions cmd/sigsvr/handlers/export_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ import (
"strings"
"time"

"github.com/ontio/ontology/account"
clisvrcom "github.com/ontio/ontology/cmd/sigsvr/common"
"github.com/ontio/ontology/common"
"github.com/ontio/ontology/common/log"
"github.com/ontio/ontology/v2/account"
clisvrcom "github.com/ontio/ontology/v2/cmd/sigsvr/common"
"github.com/ontio/ontology/v2/common"
"github.com/ontio/ontology/v2/common/log"
)

type ExportAccountReq struct {
Expand Down
4 changes: 2 additions & 2 deletions cmd/sigsvr/handlers/export_account_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ import (
"os"
"testing"

"github.com/ontio/ontology/account"
clisvrcom "github.com/ontio/ontology/cmd/sigsvr/common"
"github.com/ontio/ontology/v2/account"
clisvrcom "github.com/ontio/ontology/v2/cmd/sigsvr/common"
)

func TestExportWallet(t *testing.T) {
Expand Down
6 changes: 3 additions & 3 deletions cmd/sigsvr/handlers/sig_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (
"encoding/hex"
"encoding/json"

clisvrcom "github.com/ontio/ontology/cmd/sigsvr/common"
cliutil "github.com/ontio/ontology/cmd/utils"
"github.com/ontio/ontology/common/log"
clisvrcom "github.com/ontio/ontology/v2/cmd/sigsvr/common"
cliutil "github.com/ontio/ontology/v2/cmd/utils"
"github.com/ontio/ontology/v2/common/log"
)

type SigDataReq struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/sigsvr/handlers/sig_data_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"encoding/json"
"testing"

clisvrcom "github.com/ontio/ontology/cmd/sigsvr/common"
clisvrcom "github.com/ontio/ontology/v2/cmd/sigsvr/common"
)

func TestSigData(t *testing.T) {
Expand Down
12 changes: 6 additions & 6 deletions cmd/sigsvr/handlers/sig_mutil_raw_tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ import (
"encoding/json"

"github.com/ontio/ontology-crypto/keypair"
clisvrcom "github.com/ontio/ontology/cmd/sigsvr/common"
cliutil "github.com/ontio/ontology/cmd/utils"
"github.com/ontio/ontology/common"
"github.com/ontio/ontology/common/constants"
"github.com/ontio/ontology/common/log"
"github.com/ontio/ontology/core/types"
clisvrcom "github.com/ontio/ontology/v2/cmd/sigsvr/common"
cliutil "github.com/ontio/ontology/v2/cmd/utils"
"github.com/ontio/ontology/v2/common"
"github.com/ontio/ontology/v2/common/constants"
"github.com/ontio/ontology/v2/common/log"
"github.com/ontio/ontology/v2/core/types"
)

type SigMutilRawTransactionReq struct {
Expand Down
Loading