From 855c34048837edc49073ff8b1445ac03d7fff1b5 Mon Sep 17 00:00:00 2001 From: Bharath Date: Tue, 3 Dec 2024 15:16:02 +0530 Subject: [PATCH] remove unecessary lock --- grpc/optimistic/server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grpc/optimistic/server.go b/grpc/optimistic/server.go index 2c7027c92..08da038d5 100644 --- a/grpc/optimistic/server.go +++ b/grpc/optimistic/server.go @@ -172,9 +172,7 @@ func (o *OptimisticServiceV1Alpha1) ExecuteOptimisticBlock(ctx context.Context, softBlock := o.Bc().CurrentSafeBlock() - o.BlockExecutionLock().Lock() nextFeeRecipient := o.NextFeeRecipient() - o.BlockExecutionLock().Unlock() // the height that this block will be at height := o.Bc().CurrentBlock().Number.Uint64() + 1 @@ -214,6 +212,8 @@ func (o *OptimisticServiceV1Alpha1) ExecuteOptimisticBlock(ctx context.Context, // we store a pointer to the optimistic block in the chain so that we can use it // to retrieve the state of the optimistic block + // this method also sends an event which indicates that a new optimistic block has been set + // the mempool clearing logic is triggered when this event is received o.Bc().SetOptimistic(block) res := &astriaPb.Block{