mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-22 04:36:42 +00:00
core/txpool/blobpool: move tx notification event inside add
Since we add transaction with delay, we can't have this directly in `Add`, or we would need to set it up to handle a feed itself. It is easier to do it directly in `add`. The downside is that we change the granularity, creating an event for every single blob tx. Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
parent
4e0aa78bd3
commit
b60b385342
1 changed files with 2 additions and 4 deletions
|
|
@ -1704,10 +1704,6 @@ func (p *BlobPool) Add(txs []*types.Transaction, sync bool) []error {
|
|||
adds = append(adds, tx.WithoutBlobTxSidecar())
|
||||
}
|
||||
}
|
||||
if len(adds) > 0 {
|
||||
p.discoverFeed.Send(core.NewTxsEvent{Txs: adds})
|
||||
p.insertFeed.Send(core.NewTxsEvent{Txs: adds})
|
||||
}
|
||||
return errs
|
||||
}
|
||||
|
||||
|
|
@ -1908,6 +1904,8 @@ func (p *BlobPool) add(tx *types.Transaction) (err error) {
|
|||
}()
|
||||
}
|
||||
}
|
||||
p.discoverFeed.Send(core.NewTxsEvent{Txs: []*types.Transaction{tx.WithoutBlobTxSidecar()}})
|
||||
p.insertFeed.Send(core.NewTxsEvent{Txs: []*types.Transaction{tx.WithoutBlobTxSidecar()}})
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue