Skip to content

Commit

Permalink
Setup skynet on visor start
Browse files Browse the repository at this point in the history
  • Loading branch information
Darkren committed Oct 29, 2019
1 parent 8a78685 commit de20f07
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/visor/visor.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import (
"syscall"
"time"

"github.com/skycoin/skywire/pkg/app2/appnet"

"github.com/skycoin/skywire/pkg/app2/appserver"

"github.com/skycoin/skywire/pkg/app2/appcommon"
Expand Down Expand Up @@ -211,6 +213,12 @@ func NewNode(config *Config, masterLogger *logging.MasterLogger) (*Node, error)

// Start spawns auto-started Apps, starts router and RPC interfaces .
func (node *Node) Start() error {
skywireNetworker := appnet.NewSkywireNetworker(logging.MustGetLogger("skynet"), node.router)
appnet.ClearNetworkers()
if err := appnet.AddNetworker(appnet.TypeSkynet, skywireNetworker); err != nil {
return errors.Wrap(err, "error adding skywire networker")
}

ctx := context.Background()
node.startedAt = time.Now()

Expand Down

0 comments on commit de20f07

Please sign in to comment.