From 78d52b40de50df72ae2e2bf2bfe58fef956cc725 Mon Sep 17 00:00:00 2001 From: Michael Vandeberg Date: Thu, 14 Jul 2022 15:44:12 -0700 Subject: [PATCH] Connect applicator broadcast handlers --- internal/node/node.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/internal/node/node.go b/internal/node/node.go index e77f6b0..23cdaa8 100644 --- a/internal/node/node.go +++ b/internal/node/node.go @@ -192,6 +192,10 @@ func (n *KoinosP2PNode) handleBlockBroadcast(topic string, data []byte) { return } + go func() { + n.BlockApplicator.HandleBlockBroadcast(blockBroadcast) + }() + // If gossip is enabled publish the block if n.GossipToggle.IsEnabled() { err = n.Gossip.PublishBlock(context.Background(), blockBroadcast.Block) @@ -230,6 +234,10 @@ func (n *KoinosP2PNode) handleForkUpdate(topic string, data []byte) { return } + go func() { + n.BlockApplicator.HandleForkHeads(forkHeads) + }() + n.libValue.Store(forkHeads.LastIrreversibleBlock) }