Skip to content

Commit

Permalink
go/worker/compute/executor/committee: Process all runtime blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
peternose committed Nov 6, 2023
1 parent e88ebe5 commit c439226
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions go/worker/compute/executor/committee/hooks.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package committee

import (
"context"

"github.com/oasisprotocol/oasis-core/go/common/crash"
runtime "github.com/oasisprotocol/oasis-core/go/runtime/api"
"github.com/oasisprotocol/oasis-core/go/worker/common/committee"
Expand Down Expand Up @@ -35,12 +33,13 @@ func (n *Node) HandleNewBlockEarlyLocked(*runtime.BlockInfo) {
// HandleNewBlockLocked implements NodeHooks.
// Guarded by n.commonNode.CrossNode.
func (n *Node) HandleNewBlockLocked(bi *runtime.BlockInfo) {
// Drop blocks if the worker falls behind.
// Stop sending blocks if the worker has stopped.
select {
case <-n.blockInfoCh:
case <-n.stopCh:
return
default:
}

// Non-blocking send.
// Don't skip any blocks, as the round worker must finalize the final round.
n.blockInfoCh <- bi
}

0 comments on commit c439226

Please sign in to comment.