OSDN Git Service

rename (#465)
[bytom/vapor.git] / netsync / sync_manager.go
index 95ffbb4..839d1db 100644 (file)
@@ -5,15 +5,15 @@ import (
 
        "github.com/sirupsen/logrus"
 
-       "github.com/vapor/config"
-       "github.com/vapor/consensus"
-       dbm "github.com/vapor/database/leveldb"
-       "github.com/vapor/event"
-       "github.com/vapor/netsync/chainmgr"
-       "github.com/vapor/netsync/consensusmgr"
-       "github.com/vapor/netsync/peers"
-       "github.com/vapor/p2p"
-       "github.com/vapor/protocol"
+       "github.com/bytom/vapor/config"
+       "github.com/bytom/vapor/consensus"
+       dbm "github.com/bytom/vapor/database/leveldb"
+       "github.com/bytom/vapor/event"
+       "github.com/bytom/vapor/netsync/chainmgr"
+       "github.com/bytom/vapor/netsync/consensusmgr"
+       "github.com/bytom/vapor/netsync/peers"
+       "github.com/bytom/vapor/p2p"
+       "github.com/bytom/vapor/protocol"
 )
 
 const (
@@ -57,7 +57,7 @@ type SyncManager struct {
 
 // NewSyncManager create sync manager and set switch.
 func NewSyncManager(config *config.Config, chain *protocol.Chain, txPool *protocol.TxPool, dispatcher *event.Dispatcher, fastSyncDB dbm.DB) (*SyncManager, error) {
-       sw, err := p2p.NewSwitch(config)
+       sw, err := p2p.NewSwitchMaybeDiscover(config)
        if err != nil {
                return nil, err
        }
@@ -67,7 +67,7 @@ func NewSyncManager(config *config.Config, chain *protocol.Chain, txPool *protoc
        if err != nil {
                return nil, err
        }
-       consensusMgr := consensusmgr.NewManager(sw, chain, dispatcher, peers)
+       consensusMgr := consensusmgr.NewManager(sw, chain, peers, dispatcher)
        return &SyncManager{
                config:       config,
                sw:           sw,