Skip to content

Commit

Permalink
Deadlock fix
Browse files Browse the repository at this point in the history
  • Loading branch information
karimodm committed Nov 27, 2023
1 parent ab3fdec commit 66807e0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/protocol/protocol_warp_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,12 @@ func (w *WarpSyncProtocol) ProcessResponse(commitmentID iotago.CommitmentID, blo
commitment.IsFullyBooked.OnUpdateOnce(func(_ bool, _ bool) {
minimumCommittableAge := w.protocol.APIForSlot(commitmentID.Slot()).ProtocolParameters().MinCommittableAge()
if committableCommitment, exists := chain.Commitment(commitmentID.Slot() - minimumCommittableAge + 1); exists {
committableCommitment.IsCommittable.Trigger()
committableCommitment.IsCommittable.Set(true)
}
})

commitment.IsCommittable.OnUpdateOnce(func(_ bool, _ bool) {
forceCommitmentFunc()
w.workerPool.Submit(forceCommitmentFunc)
})

if totalBlocks == 0 {
Expand Down

0 comments on commit 66807e0

Please sign in to comment.