Skip to content

Commit

Permalink
remove unecessary lock
Browse files Browse the repository at this point in the history
  • Loading branch information
bharath-123 committed Dec 3, 2024
1 parent 328c629 commit 855c340
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions grpc/optimistic/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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{
Expand Down

0 comments on commit 855c340

Please sign in to comment.