From 498e4d5623d1443164929014255d9ef03944e4d8 Mon Sep 17 00:00:00 2001 From: Hans Moog <hm@mkjc.net> Date: Wed, 19 Feb 2020 21:25:08 +0100 Subject: [PATCH] Refactor: reverted some changes --- plugins/gossip/plugin.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/plugins/gossip/plugin.go b/plugins/gossip/plugin.go index 39a3e7fd..4b8bee22 100644 --- a/plugins/gossip/plugin.go +++ b/plugins/gossip/plugin.go @@ -9,6 +9,7 @@ import ( "github.com/iotaledger/hive.go/node" "github.com/iotaledger/goshimmer/packages/binary/tangle/model/transaction" + "github.com/iotaledger/goshimmer/packages/binary/tangle/model/transactionmetadata" "github.com/iotaledger/goshimmer/packages/gossip" "github.com/iotaledger/goshimmer/packages/shutdown" "github.com/iotaledger/goshimmer/plugins/tangle" @@ -76,14 +77,13 @@ func configureEvents() { })) // configure flow of outgoing transactions (gossip on solidification) - /* - tangle.Instance.Events.TransactionSolid.Attach(events.NewClosure(func(cachedTransaction *transaction.CachedTransaction, transactionMetadata *transactionmetadata.CachedTransactionMetadata) { - transactionMetadata.Release() + tangle.Instance.Events.TransactionSolid.Attach(events.NewClosure(func(cachedTransaction *transaction.CachedTransaction, transactionMetadata *transactionmetadata.CachedTransactionMetadata) { + transactionMetadata.Release() - cachedTransaction.Consume(func(transaction *transaction.Transaction) { - mgr.SendTransaction(transaction.GetBytes()) - }) - }))*/ + cachedTransaction.Consume(func(transaction *transaction.Transaction) { + mgr.SendTransaction(transaction.GetBytes()) + }) + })) // request missing transactions tangle.TransactionRequester.Events.SendRequest.Attach(events.NewClosure(func(transactionId transaction.Id) { -- GitLab