From af19469568faff41a20bb98abc7b6ce6425d825c Mon Sep 17 00:00:00 2001 From: Bharath Date: Wed, 27 Nov 2024 16:14:14 +0530 Subject: [PATCH] comment out connection restrictions --- grpc/optimistic/server.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/grpc/optimistic/server.go b/grpc/optimistic/server.go index 437908650..f27451c1b 100644 --- a/grpc/optimistic/server.go +++ b/grpc/optimistic/server.go @@ -58,12 +58,12 @@ 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") - } - - // when the stream is closed, we need to set the bundleStreamConnected to false - defer o.bundleStreamConnected.Store(false) + //if !o.bundleStreamConnected.CompareAndSwap(false, true) { + // return status.Error(codes.PermissionDenied, "Bundle stream has already been connected to") + //} + // + //// when the stream is closed, we need to set the bundleStreamConnected to false + //defer o.bundleStreamConnected.Store(false) pendingTxEventCh := make(chan core.NewTxsEvent) pendingTxEvent := o.Eth().TxPool().SubscribeTransactions(pendingTxEventCh, false) @@ -113,12 +113,12 @@ 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") - } - - // when the stream is closed, we need to set the bundleStreamConnected to false - defer o.executeOptimisticBlockStreamConnected.Store(false) + //if !o.executeOptimisticBlockStreamConnected.CompareAndSwap(false, true) { + // return status.Error(codes.PermissionDenied, "Execute optimistic block stream has already been connected to") + //} + // + //// when the stream is closed, we need to set the bundleStreamConnected to false + //defer o.executeOptimisticBlockStreamConnected.Store(false) mempoolClearingEventCh := make(chan core.NewMempoolCleared) mempoolClearingEvent := o.Eth().TxPool().SubscribeMempoolClearance(mempoolClearingEventCh)