Skip to content

Commit

Permalink
Connect applicator broadcast handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
mvandeberg committed Jul 14, 2022
1 parent 9070f07 commit 78d52b4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions internal/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -230,6 +234,10 @@ func (n *KoinosP2PNode) handleForkUpdate(topic string, data []byte) {
return
}

go func() {
n.BlockApplicator.HandleForkHeads(forkHeads)
}()

n.libValue.Store(forkHeads.LastIrreversibleBlock)
}

Expand Down

0 comments on commit 78d52b4

Please sign in to comment.