From 3962e4d6a7d8dc50fcfec135eeac54f9de4ac39a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrei=20B=C4=83ncioiu?= Date: Thu, 7 Nov 2024 16:46:28 +0200 Subject: [PATCH] Adjust call of "notifyTransactionProviderIfNeeded". --- process/block/preprocess/transactions.go | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/process/block/preprocess/transactions.go b/process/block/preprocess/transactions.go index d56ed1d1f4..348c656365 100644 --- a/process/block/preprocess/transactions.go +++ b/process/block/preprocess/transactions.go @@ -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) } @@ -644,10 +645,6 @@ func (txs *transactions) processTxsFromMe( return false } - defer func() { - go txs.notifyTransactionProviderIfNeeded() - }() - calculatedMiniBlocks, _, mapSCTxs, err := txs.createAndProcessMiniBlocksFromMe( haveTime, isShardStuckFalse, @@ -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, @@ -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)