From b60b385342f8237b310ff0eae080c25fadbc4f99 Mon Sep 17 00:00:00 2001 From: Csaba Kiraly Date: Tue, 23 Sep 2025 12:45:16 +0200 Subject: [PATCH] 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 --- core/txpool/blobpool/blobpool.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/txpool/blobpool/blobpool.go b/core/txpool/blobpool/blobpool.go index 876c232d18..4e8537ba81 100644 --- a/core/txpool/blobpool/blobpool.go +++ b/core/txpool/blobpool/blobpool.go @@ -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 }