We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8ab1a3 commit d3d2167Copy full SHA for d3d2167
mempool/mempool.go
@@ -338,12 +338,14 @@ func (m *Mempool) removeTransactionByIndex(txIdx int) bool {
338
m.metrics.txsInMempool.Dec()
339
m.metrics.mempoolBytes.Sub(float64(len(tx.Cbor)))
340
// Update consumer indexes to reflect removed TX
341
+ m.consumersMutex.Lock()
342
for _, consumer := range m.consumers {
343
// Decrement consumer index if the consumer has reached the removed TX
344
if consumer.nextTxIdx > txIdx {
345
consumer.nextTxIdx--
346
}
347
348
+ m.consumersMutex.Unlock()
349
// Generate event
350
m.eventBus.Publish(
351
RemoveTransactionEventType,
0 commit comments