Skip to content

Commit

Permalink
Improve a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrm50 committed Apr 2, 2024
1 parent bda5f5e commit 818aaab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/protocol/commitments.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ func (c *Commitments) initRequester() (shutdown func()) {
// publishRootCommitment publishes the root commitment of the main engine.
func (c *Commitments) publishRootCommitment(mainChain *Chain, mainEngine *engine.Engine) func() {
return mainEngine.RootCommitment.OnUpdate(func(_ *model.Commitment, rootCommitment *model.Commitment) {
// Use workerpool to avoid a deadlock when
// Use workerpool to avoid a deadlock when warpSync mode is being enabled at the same time.
// Two goroutines deadlock on Commitment.IsSynced
// https://github.com/iotaledger/iota-core/issues/898
c.workerPool.Submit(func() {
publishedCommitment, published, err := c.publishCommitment(rootCommitment)
if err != nil {
Expand Down

0 comments on commit 818aaab

Please sign in to comment.