Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
karimodm committed Oct 19, 2023
1 parent b0a34dc commit 6b41e5d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 2 additions & 1 deletion pkg/protocol/engine/blockdag/inmemoryblockdag/blockdag.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ type BlockDAG struct {

func NewProvider(opts ...options.Option[BlockDAG]) module.Provider[*engine.Engine, blockdag.BlockDAG] {
return module.Provide(func(e *engine.Engine) blockdag.BlockDAG {

b := New(e.Workers.CreateGroup("BlockDAG"), int(e.Storage.Settings().APIProvider().CommittedAPI().ProtocolParameters().MaxCommittableAge())*2, e.EvictionState, e.BlockCache, e.ErrorHandler("blockdag"), opts...)

e.HookConstructed(func() {
Expand Down Expand Up @@ -78,6 +77,8 @@ func (b *BlockDAG) setupBlock(block *blocks.Block) {
block.ForEachParent(func(parent iotago.Parent) {
parentBlock, exists := b.blockCache.Block(parent.ID)
if !exists {
b.errorHandler(ierrors.Errorf("failed to setup block %s, parent %s is missing", block.ID(), parent.ID))

return
}

Expand Down
4 changes: 0 additions & 4 deletions pkg/protocol/engine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,6 @@ func (e *Engine) Shutdown() {
e.CommitmentFilter.Shutdown()
e.Scheduler.Shutdown()
e.Retainer.Shutdown()
go func() {
time.Sleep(5 * time.Second)
fmt.Println(e.Workers.String())
}()
e.Workers.Shutdown()
e.Storage.Shutdown()

Expand Down

0 comments on commit 6b41e5d

Please sign in to comment.