Skip to content

Commit

Permalink
revert double execution fix (#744)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangchiqing authored May 21, 2021
1 parent f0e3bc9 commit e4077d4
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions engine/execution/ingestion/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -693,10 +693,6 @@ func (e *Engine) onBlockExecuted(executed *entity.ExecutableBlock, finalState fl
// return a bool indicates whether the block was completed
func (e *Engine) executeBlockIfComplete(eb *entity.ExecutableBlock) bool {

if eb.Executing {
return false
}

// if the eb has parent statecommitment, and we have the delta for this block
// then apply the delta
// note the block ID is the delta's ID
Expand Down Expand Up @@ -727,9 +723,6 @@ func (e *Engine) executeBlockIfComplete(eb *entity.ExecutableBlock) bool {
e.logExecutableBlock(eb)
}

// no external synchronisation is used because this method must be run in a thread-safe context
eb.Executing = true

e.unit.Launch(func() {
e.executeBlock(e.unit.Ctx(), eb)
})
Expand Down Expand Up @@ -808,8 +801,6 @@ func (e *Engine) handleCollection(originID flow.Identifier, collection *flow.Col
// the collection id matches with the CollectionID from the collection guarantee
completeCollection.Transactions = collection.Transactions

fmt.Printf("handled collection\n")

// check if the block becomes executable
_ = e.executeBlockIfComplete(executableBlock)
}
Expand Down

0 comments on commit e4077d4

Please sign in to comment.