diff --git a/op-batcher/batcher/channel_manager.go b/op-batcher/batcher/channel_manager.go index 25900906d0dd..06403645ea4d 100644 --- a/op-batcher/batcher/channel_manager.go +++ b/op-batcher/batcher/channel_manager.go @@ -118,8 +118,11 @@ func (s *channelManager) TxConfirmed(_id txID, inclusionBlock eth.BlockID) { delete(s.txChannels, id) done, blocksToRequeue := channel.TxConfirmed(id, inclusionBlock) if done { + s.removePendingChannel(channel) + if len(blocksToRequeue) > 0 { + s.blocks.Prepend(blocksToRequeue...) + } for _, b := range blocksToRequeue { - s.blocks.Prepend(b) s.metr.RecordL2BlockInPendingQueue(b) } } @@ -505,8 +508,8 @@ func (s *channelManager) Requeue(newCfg ChannelConfig) { } // We put the blocks back at the front of the queue: + s.blocks.Prepend(blocksToRequeue...) for _, b := range blocksToRequeue { - s.blocks.Prepend(b) s.metr.RecordL2BlockInPendingQueue(b) }