From 49b5925029611775b9de092770f5922e1c4dafe1 Mon Sep 17 00:00:00 2001 From: Hans Moog <hm@mkjc.net> Date: Sat, 22 Feb 2020 17:14:34 +0100 Subject: [PATCH] Refactor: changed tangle package in graph plugin --- plugins/graph/plugin.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/graph/plugin.go b/plugins/graph/plugin.go index af1a9202..c1aedcb1 100644 --- a/plugins/graph/plugin.go +++ b/plugins/graph/plugin.go @@ -6,6 +6,8 @@ import ( "time" "github.com/iotaledger/goshimmer/plugins/config" + "github.com/iotaledger/goshimmer/plugins/tangle" + "golang.org/x/net/context" "github.com/iotaledger/goshimmer/packages/model/value_transaction" @@ -100,10 +102,10 @@ func run(*node.Plugin) { daemon.BackgroundWorker("Graph[NewTxWorker]", func(shutdownSignal <-chan struct{}) { log.Info("Starting Graph[NewTxWorker] ... done") - tangle_old.Events.TransactionStored.Attach(notifyNewTx) + tangle.Instance.Events.TransactionAttached.Attach(notifyNewTx) newTxWorkerPool.Start() <-shutdownSignal - tangle_old.Events.TransactionStored.Detach(notifyNewTx) + tangle.Instance.Events.TransactionAttached.Detach(notifyNewTx) newTxWorkerPool.Stop() log.Info("Stopping Graph[NewTxWorker] ... done") }, shutdown.ShutdownPriorityGraph) -- GitLab