Skip to content

Commit

Permalink
Merge pull request #325 from aergoio/feature/tidy_package
Browse files Browse the repository at this point in the history
tidy packages
  • Loading branch information
rabbitprincess authored Nov 27, 2023
2 parents 1e11987 + c8e9dbb commit b8d24a4
Show file tree
Hide file tree
Showing 114 changed files with 97 additions and 187 deletions.
53 changes: 0 additions & 53 deletions .travis.yml

This file was deleted.

14 changes: 0 additions & 14 deletions Dockerfile

This file was deleted.

10 changes: 0 additions & 10 deletions Dockerfile.polaris

This file was deleted.

13 changes: 0 additions & 13 deletions Dockerfile.tools

This file was deleted.

2 changes: 1 addition & 1 deletion account/accountservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"github.com/aergoio/aergo/v2/account/key"
cfg "github.com/aergoio/aergo/v2/config"
"github.com/aergoio/aergo/v2/contract/name"
"github.com/aergoio/aergo/v2/message"
"github.com/aergoio/aergo/v2/pkg/component"
"github.com/aergoio/aergo/v2/state"
"github.com/aergoio/aergo/v2/types"
"github.com/aergoio/aergo/v2/types/message"
)

type AccountService struct {
Expand Down
2 changes: 1 addition & 1 deletion account/signer.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package account
import (
"github.com/aergoio/aergo-actor/actor"
"github.com/aergoio/aergo/v2/account/key"
"github.com/aergoio/aergo/v2/message"
"github.com/aergoio/aergo/v2/types/message"
)

type Signer struct {
Expand Down
2 changes: 1 addition & 1 deletion chain/chainhandle.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ import (
"github.com/aergoio/aergo/v2/fee"
"github.com/aergoio/aergo/v2/internal/enc/base58"
"github.com/aergoio/aergo/v2/internal/enc/proto"
"github.com/aergoio/aergo/v2/message"
"github.com/aergoio/aergo/v2/state"
"github.com/aergoio/aergo/v2/types"
"github.com/aergoio/aergo/v2/types/message"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion chain/chainservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ import (
"github.com/aergoio/aergo/v2/contract/system"
"github.com/aergoio/aergo/v2/fee"
"github.com/aergoio/aergo/v2/internal/enc/base58"
"github.com/aergoio/aergo/v2/message"
"github.com/aergoio/aergo/v2/pkg/component"
"github.com/aergoio/aergo/v2/state"
"github.com/aergoio/aergo/v2/types"
"github.com/aergoio/aergo/v2/types/dbkey"
"github.com/aergoio/aergo/v2/types/message"
lru "github.com/hashicorp/golang-lru"
)

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

"github.com/aergoio/aergo-actor/actor"
"github.com/aergoio/aergo/v2/internal/enc/base58"
"github.com/aergoio/aergo/v2/message"
"github.com/aergoio/aergo/v2/pkg/component"
"github.com/aergoio/aergo/v2/types"
"github.com/aergoio/aergo/v2/types/message"
)

type ChainVerifier struct {
Expand Down
2 changes: 1 addition & 1 deletion chain/reorg.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"github.com/aergoio/aergo/v2/consensus"
"github.com/aergoio/aergo/v2/contract/system"
"github.com/aergoio/aergo/v2/internal/enc/base58"
"github.com/aergoio/aergo/v2/message"
"github.com/aergoio/aergo/v2/state"
"github.com/aergoio/aergo/v2/types"
"github.com/aergoio/aergo/v2/types/message"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion chain/signVerifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (
"github.com/aergoio/aergo/v2/account/key"
"github.com/aergoio/aergo/v2/contract/name"
"github.com/aergoio/aergo/v2/internal/enc/base58"
"github.com/aergoio/aergo/v2/message"
"github.com/aergoio/aergo/v2/pkg/component"
"github.com/aergoio/aergo/v2/state"
"github.com/aergoio/aergo/v2/types"
"github.com/aergoio/aergo/v2/types/message"
)

type SignVerifier struct {
Expand Down
2 changes: 1 addition & 1 deletion chain/stubchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"math/big"
"time"

"github.com/aergoio/aergo/v2/message"
"github.com/aergoio/aergo/v2/types"
"github.com/aergoio/aergo/v2/types/message"
)

// StubSyncer receive Syncer, P2P, Chain Service actor message
Expand Down
2 changes: 1 addition & 1 deletion cmd/aergosvr/aergosvr.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/aergoio/aergo-lib/log"
"github.com/aergoio/aergo/v2/account"
"github.com/aergoio/aergo/v2/chain"
polarisclient "github.com/aergoio/aergo/v2/cmd/polaris/client"
"github.com/aergoio/aergo/v2/config"
"github.com/aergoio/aergo/v2/consensus"
"github.com/aergoio/aergo/v2/consensus/impl"
Expand All @@ -19,7 +20,6 @@ import (
"github.com/aergoio/aergo/v2/p2p"
"github.com/aergoio/aergo/v2/p2p/p2pkey"
"github.com/aergoio/aergo/v2/pkg/component"
polarisclient "github.com/aergoio/aergo/v2/polaris/client"
"github.com/aergoio/aergo/v2/rpc"
"github.com/aergoio/aergo/v2/syncer"
"github.com/spf13/cobra"
Expand Down
2 changes: 1 addition & 1 deletion cmd/colaris/cmd/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package cmd

import (
"github.com/aergoio/aergo-lib/config"
"github.com/aergoio/aergo/v2/polaris/common"
"github.com/aergoio/aergo/v2/cmd/polaris/common"
)

const (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ import (

"github.com/aergoio/aergo-actor/actor"
"github.com/aergoio/aergo-lib/log"
"github.com/aergoio/aergo/v2/cmd/polaris/common"
"github.com/aergoio/aergo/v2/config"
"github.com/aergoio/aergo/v2/message"
"github.com/aergoio/aergo/v2/p2p/p2pcommon"
"github.com/aergoio/aergo/v2/p2p/p2pkey"
"github.com/aergoio/aergo/v2/p2p/p2putil"
v030 "github.com/aergoio/aergo/v2/p2p/v030"
"github.com/aergoio/aergo/v2/pkg/component"
"github.com/aergoio/aergo/v2/polaris/common"
"github.com/aergoio/aergo/v2/types"
"github.com/aergoio/aergo/v2/types/message"
"github.com/libp2p/go-libp2p-core/network"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import (
"errors"
"testing"

"github.com/aergoio/aergo/v2/cmd/polaris/common"
"github.com/aergoio/aergo/v2/config"
"github.com/aergoio/aergo/v2/p2p/p2pcommon"
"github.com/aergoio/aergo/v2/p2p/p2pmock"
"github.com/aergoio/aergo/v2/p2p/p2putil"
"github.com/aergoio/aergo/v2/pkg/component"
"github.com/aergoio/aergo/v2/polaris/common"
"github.com/aergoio/aergo/v2/types"
"github.com/golang/mock/gomock"
)
Expand All @@ -37,7 +37,7 @@ func (dntc *dummyNTC) GenesisChainID() *types.ChainID {
}

var (
pmapDummyCfg = &config.Config{P2P: &config.P2PConfig{}, Polaris: &config.PolarisConfig{GenesisFile: "../../examples/genesis.json"}}
pmapDummyCfg = &config.Config{P2P: &config.P2PConfig{}, Polaris: &config.PolarisConfig{GenesisFile: "../examples/genesis.json"}}
pmapDummyNTC = &dummyNTC{chainID: &types.ChainID{}}
)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import (
"time"

"github.com/aergoio/aergo-lib/log"
"github.com/aergoio/aergo/v2/examples/component/message"
"github.com/aergoio/aergo/v2/examples/component/server"
"github.com/aergoio/aergo/v2/examples/component/service"
"github.com/aergoio/aergo/v2/cmd/polaris/examples/component/message"
"github.com/aergoio/aergo/v2/cmd/polaris/examples/component/server"
"github.com/aergoio/aergo/v2/cmd/polaris/examples/component/service"
"github.com/aergoio/aergo/v2/pkg/component"
)

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ package server

import (
"github.com/aergoio/aergo-actor/actor"
"github.com/aergoio/aergo/v2/examples/component/message"
"github.com/aergoio/aergo/v2/cmd/polaris/examples/component/message"
"github.com/aergoio/aergo/v2/pkg/component"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (

"github.com/aergoio/aergo-actor/actor"
"github.com/aergoio/aergo-lib/log"
"github.com/aergoio/aergo/v2/examples/component/message"
"github.com/aergoio/aergo/v2/cmd/polaris/examples/component/message"
"github.com/aergoio/aergo/v2/pkg/component"
)

Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions cmd/polaris/polaris.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import (

"github.com/aergoio/aergo-actor/actor"
"github.com/aergoio/aergo-lib/log"
common2 "github.com/aergoio/aergo/v2/cmd/polaris/common"
"github.com/aergoio/aergo/v2/cmd/polaris/server"
"github.com/aergoio/aergo/v2/config"
"github.com/aergoio/aergo/v2/internal/common"
"github.com/aergoio/aergo/v2/p2p/p2pkey"
"github.com/aergoio/aergo/v2/pkg/component"
common2 "github.com/aergoio/aergo/v2/polaris/common"
"github.com/aergoio/aergo/v2/polaris/server"
"github.com/spf13/cobra"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/polaris/polaris_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"testing"

"github.com/aergoio/aergo/v2/cmd/polaris/common"
"github.com/aergoio/aergo/v2/config"
"github.com/aergoio/aergo/v2/polaris/common"
)

func Test_arrangeDefaultCfgForPolaris(t *testing.T) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ func Test_readGenesis(t *testing.T) {
wantRet *types.Genesis
wantErr bool
}{
{"Tsucc", args{"../../examples/genesis.json"}, sampleGenesis, false},
{"TNotExist", args{"../../examples/genesis.notjson"}, nil, true},
{"TNotGenesis", args{"../../examples/component/main.go"}, nil, true},
{"Tsucc", args{"../examples/genesis.json"}, sampleGenesis, false},
{"TNotExist", args{"../examples/genesis.notjson"}, nil, true},
{"TNotGenesis", args{"../examples/component/main.go"}, nil, true},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (
"time"

"github.com/aergoio/aergo-lib/log"
"github.com/aergoio/aergo/v2/cmd/polaris/common"
"github.com/aergoio/aergo/v2/p2p/p2pcommon"
"github.com/aergoio/aergo/v2/polaris/common"
)

type HealthCheckManager interface {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ import (
"github.com/aergoio/aergo/v2/config"
"github.com/aergoio/aergo/v2/consensus"
"github.com/aergoio/aergo/v2/internal/network"
"github.com/aergoio/aergo/v2/message"
"github.com/aergoio/aergo/v2/p2p/p2pcommon"
"github.com/aergoio/aergo/v2/p2p/p2pkey"
"github.com/aergoio/aergo/v2/p2p/p2putil"
"github.com/aergoio/aergo/v2/p2p/transport"
"github.com/aergoio/aergo/v2/pkg/component"
"github.com/aergoio/aergo/v2/types"
"github.com/aergoio/aergo/v2/types/message"
)

// P2P is actor component for p2p
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ import (

"github.com/aergoio/aergo-actor/actor"
"github.com/aergoio/aergo-lib/log"
"github.com/aergoio/aergo/v2/cmd/polaris/common"
"github.com/aergoio/aergo/v2/config"
"github.com/aergoio/aergo/v2/internal/network"
"github.com/aergoio/aergo/v2/p2p/p2pcommon"
"github.com/aergoio/aergo/v2/p2p/p2putil"
v030 "github.com/aergoio/aergo/v2/p2p/v030"
"github.com/aergoio/aergo/v2/pkg/component"
"github.com/aergoio/aergo/v2/polaris/common"
"github.com/aergoio/aergo/v2/types"
"github.com/gofrs/uuid"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ import (
"testing"
"time"

"github.com/aergoio/aergo/v2/cmd/polaris/common"
"github.com/aergoio/aergo/v2/config"
"github.com/aergoio/aergo/v2/internal/enc/proto"
"github.com/aergoio/aergo/v2/p2p/p2pcommon"
"github.com/aergoio/aergo/v2/p2p/p2pmock"
"github.com/aergoio/aergo/v2/p2p/p2putil"
"github.com/aergoio/aergo/v2/pkg/component"
"github.com/aergoio/aergo/v2/polaris/common"
"github.com/aergoio/aergo/v2/types"
"github.com/golang/mock/gomock"
"github.com/libp2p/go-libp2p-core/network"
Expand All @@ -44,7 +44,7 @@ func (dntc *dummyNTC) GenesisChainID() *types.ChainID {
}

var (
pmapDummyCfg = &config.Config{P2P: &config.P2PConfig{}, Polaris: &config.PolarisConfig{GenesisFile: "../../examples/genesis.json"},
pmapDummyCfg = &config.Config{P2P: &config.P2PConfig{}, Polaris: &config.PolarisConfig{GenesisFile: "../examples/genesis.json"},
Auth: &config.AuthConfig{EnableLocalConf: false}}
pmapDummyNTC = &dummyNTC{chainID: &types.ChainID{}}
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (
"sync/atomic"
"time"

"github.com/aergoio/aergo/v2/cmd/polaris/common"
"github.com/aergoio/aergo/v2/p2p/p2pcommon"
"github.com/aergoio/aergo/v2/p2p/p2putil"
v030 "github.com/aergoio/aergo/v2/p2p/v030"
"github.com/aergoio/aergo/v2/polaris/common"
"github.com/aergoio/aergo/v2/types"
)

Expand Down
File renamed without changes.
Loading

0 comments on commit b8d24a4

Please sign in to comment.