Skip to content

Commit

Permalink
Feat: add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
hmoog committed Nov 30, 2023
1 parent ff87a2e commit 8b97187
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/protocol/engine/blockdag/inmemoryblockdag/blockdag.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,10 @@ func (b *BlockDAG) setupBlock(block *blocks.Block) {
unsolidParents.Delete(parent.ID)
fmt.Println("unsolid Parents of ", block.ID(), unsolidParents)

if unsolidParentsCount.Add(-1) == 0 {
if counter := unsolidParentsCount.Add(-1); counter == 0 {
fmt.Println("unsolid counter", counter)
if block.SetSolid() {
fmt.Println("unsolid Trigger", counter)
b.events.BlockSolid.Trigger(block)
}
}
Expand Down

0 comments on commit 8b97187

Please sign in to comment.