Skip to content
Snippets Groups Projects
Commit 49b59250 authored by Hans Moog's avatar Hans Moog
Browse files

Refactor: changed tangle package in graph plugin

parent 78dd504a
No related branches found
No related tags found
No related merge requests found
...@@ -6,6 +6,8 @@ import ( ...@@ -6,6 +6,8 @@ import (
"time" "time"
"github.com/iotaledger/goshimmer/plugins/config" "github.com/iotaledger/goshimmer/plugins/config"
"github.com/iotaledger/goshimmer/plugins/tangle"
"golang.org/x/net/context" "golang.org/x/net/context"
"github.com/iotaledger/goshimmer/packages/model/value_transaction" "github.com/iotaledger/goshimmer/packages/model/value_transaction"
...@@ -100,10 +102,10 @@ func run(*node.Plugin) { ...@@ -100,10 +102,10 @@ func run(*node.Plugin) {
daemon.BackgroundWorker("Graph[NewTxWorker]", func(shutdownSignal <-chan struct{}) { daemon.BackgroundWorker("Graph[NewTxWorker]", func(shutdownSignal <-chan struct{}) {
log.Info("Starting Graph[NewTxWorker] ... done") log.Info("Starting Graph[NewTxWorker] ... done")
tangle_old.Events.TransactionStored.Attach(notifyNewTx) tangle.Instance.Events.TransactionAttached.Attach(notifyNewTx)
newTxWorkerPool.Start() newTxWorkerPool.Start()
<-shutdownSignal <-shutdownSignal
tangle_old.Events.TransactionStored.Detach(notifyNewTx) tangle.Instance.Events.TransactionAttached.Detach(notifyNewTx)
newTxWorkerPool.Stop() newTxWorkerPool.Stop()
log.Info("Stopping Graph[NewTxWorker] ... done") log.Info("Stopping Graph[NewTxWorker] ... done")
}, shutdown.ShutdownPriorityGraph) }, shutdown.ShutdownPriorityGraph)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment