Skip to content

Commit

Permalink
add some logs
Browse files Browse the repository at this point in the history
  • Loading branch information
bharath-123 committed Dec 2, 2024
1 parent 92242a4 commit ffddf4b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions grpc/optimistic/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,13 @@ func (o *OptimisticServiceV1Alpha1) ExecuteOptimisticBlockStream(stream optimist
BaseSequencerBlockHash: baseBlock.SequencerBlockHash,
})
case <-time.After(500 * time.Millisecond):
log.Error("timed out waiting for mempool to clear after optimistic block execution")
return status.Error(codes.DeadlineExceeded, "timed out waiting for mempool to clear after optimistic block execution")
case err := <-mempoolClearingEvent.Err():
log.Error("error waiting for mempool clearing event", "err", err)
return status.Errorf(codes.Internal, "error waiting for mempool clearing event: %v", err)
case err := <-stream.Context().Done():
log.Error("ExecuteOptimisticBlockStream stream closed with error", "err", err)
return status.Errorf(codes.Internal, "stream closed with error: %v", err)
}
}
Expand Down

0 comments on commit ffddf4b

Please sign in to comment.