From 1886219894078a139b7c35eb8a0cf69b0f2249b6 Mon Sep 17 00:00:00 2001 From: Daniel Liu <139250065@qq.com> Date: Mon, 5 Jan 2026 14:42:28 +0800 Subject: [PATCH] core/txpool: use right type for field Txs in NewTxsEvent (#1897) This commit updates the Txs field in NewTxsEvent to use []*types.Transaction instead of types.Transactions. This ensures type consistency for event broadcasting and handling, improving reliability of transaction propagation across the network. The change also removes unnecessary goroutine usage for txFeed.Send, making event delivery synchronous and safer for downstream consumers. --- core/txpool/txpool.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/txpool/txpool.go b/core/txpool/txpool.go index 0f7354e9e3..e6765b57fb 100644 --- a/core/txpool/txpool.go +++ b/core/txpool/txpool.go @@ -971,7 +971,7 @@ func (pool *TxPool) promoteSpecialTx(addr common.Address, tx *types.Transaction, // Set the potentially new pending nonce and notify any subsystems of the new tx pool.beats[addr] = time.Now() pool.pendingNonces.set(addr, tx.Nonce()+1) - go pool.txFeed.Send(core.NewTxsEvent{Txs: types.Transactions{tx}}) + pool.txFeed.Send(core.NewTxsEvent{Txs: []*types.Transaction{tx}}) return true, nil }