mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
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.
This commit is contained in:
parent
3fb8b87a87
commit
1886219894
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue