Skip to content

Commit

Permalink
Merge pull request #525 from iotaledger/fix/testsuite-tracking-filter…
Browse files Browse the repository at this point in the history
…ed-blocks

Fix tracking filtered blocks in the Testsuite
  • Loading branch information
piotrm50 authored Nov 15, 2023
2 parents 3ab0b0a + 4c0ac56 commit d070e81
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/testsuite/mock/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,13 @@ func (n *Node) hookEvents() {
events.CandidateEngineActivated.Hook(func(e *engine.Engine) { n.candidateEngineActivatedCount.Add(1) })

events.MainEngineSwitched.Hook(func(e *engine.Engine) { n.mainEngineSwitchedCount.Add(1) })

n.Protocol.Events.Engine.CommitmentFilter.BlockFiltered.Hook(func(event *commitmentfilter.BlockFilteredEvent) {
n.mutex.Lock()
defer n.mutex.Unlock()

n.filteredBlockEvents = append(n.filteredBlockEvents, event)
})
}

func (n *Node) hookLogging(failOnBlockFiltered bool) {
Expand Down

0 comments on commit d070e81

Please sign in to comment.