Skip to content

Commit

Permalink
Adjust call of "notifyTransactionProviderIfNeeded".
Browse files Browse the repository at this point in the history
  • Loading branch information
andreibancioiu committed Nov 7, 2024
1 parent 1a5806e commit 3962e4d
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions process/block/preprocess/transactions.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ func (txs *transactions) RemoveBlockDataFromPools(body *block.Body, miniBlockPoo

// RemoveTxsFromPools removes transactions from associated pools
func (txs *transactions) RemoveTxsFromPools(body *block.Body) error {
txs.notifyTransactionProviderIfNeeded()
return txs.removeTxsFromPools(body, txs.txPool, txs.isMiniBlockCorrect)
}

Expand Down Expand Up @@ -644,10 +645,6 @@ func (txs *transactions) processTxsFromMe(
return false
}

defer func() {
go txs.notifyTransactionProviderIfNeeded()
}()

calculatedMiniBlocks, _, mapSCTxs, err := txs.createAndProcessMiniBlocksFromMe(
haveTime,
isShardStuckFalse,
Expand Down Expand Up @@ -1104,10 +1101,6 @@ func (txs *transactions) CreateAndProcessMiniBlocks(haveTime func() bool, random
return make(block.MiniBlockSlice, 0), nil
}

defer func() {
go txs.notifyTransactionProviderIfNeeded()
}()

startTime = time.Now()
miniBlocks, remainingTxs, mapSCTxs, err := txs.createAndProcessMiniBlocksFromMe(
haveTime,
Expand Down Expand Up @@ -1210,10 +1203,6 @@ func (txs *transactions) createAndProcessMiniBlocksFromMeV1(
return nil, nil, err
}

defer func() {
go txs.notifyTransactionProviderIfNeeded()
}()

remainingTxs := make([]*txcache.WrappedTransaction, 0)
for idx, wtx := range sortedTxs {
actions, tx := mbBuilder.checkAddTransaction(wtx)
Expand Down

0 comments on commit 3962e4d

Please sign in to comment.