Skip to content

Commit

Permalink
add debug logs for when the stream rpcs are called
Browse files Browse the repository at this point in the history
  • Loading branch information
bharath-123 committed Dec 2, 2024
1 parent a95cd26 commit 92242a4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions grpc/optimistic/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ func NewOptimisticServiceV1Alpha(sharedServiceContainer *shared.SharedServiceCon
}

func (o *OptimisticServiceV1Alpha1) GetBundleStream(_ *optimsticPb.GetBundleStreamRequest, stream optimisticGrpc.BundleService_GetBundleStreamServer) error {
log.Debug("GetBundleStream called")
if !o.bundleStreamConnected.CompareAndSwap(false, true) {
return status.Error(codes.PermissionDenied, "Bundle stream has already been connected to")
}
Expand Down Expand Up @@ -111,6 +112,7 @@ func (o *OptimisticServiceV1Alpha1) GetBundleStream(_ *optimsticPb.GetBundleStre
}

func (o *OptimisticServiceV1Alpha1) ExecuteOptimisticBlockStream(stream optimisticGrpc.OptimisticExecutionService_ExecuteOptimisticBlockStreamServer) error {
log.Debug("ExecuteOptimisticBlockStream called")
if !o.executeOptimisticBlockStreamConnected.CompareAndSwap(false, true) {
return status.Error(codes.PermissionDenied, "Execute optimsitic block stream has already been connected to")
}
Expand Down

0 comments on commit 92242a4

Please sign in to comment.