Skip to content

Commit

Permalink
Mark external modifications
Browse files Browse the repository at this point in the history
  • Loading branch information
lukanus committed Mar 7, 2024
1 parent 77a7160 commit 2242e63
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions core/txpool/blobpool/blobpool.go
Original file line number Diff line number Diff line change
Expand Up @@ -1216,26 +1216,30 @@ func (p *BlobPool) Get(hash common.Hash) *types.Transaction {
// consensus validity and pool restrictions).
func (p *BlobPool) Add(txs []*types.Transaction, local bool, sync bool) []error {
var (
adds = make([]*types.Transaction, 0, len(txs))
adds = make([]*types.Transaction, 0, len(txs))
// -------- BLOCKNATIVE MODIFICATION START -------------
fullAdds = make([]*types.Transaction, 0, len(txs))
errs = make([]error, len(txs))
// -------- BLOCKNATIVE MODIFICATION STOP -------------
errs = make([]error, len(txs))
)
for i, tx := range txs {
errs[i] = p.add(tx)
if errs[i] == nil {
adds = append(adds, tx.WithoutBlobTxSidecar())
// -------- BLOCKNATIVE MODIFICATION START -------------
fullAdds = append(adds, tx)
// -------- BLOCKNATIVE MODIFICATION STOP -------------
}
}

// -------- BLOCKNATIVE MODIFICATION START -------------
if len(fullAdds) > 0 {
p.insertFeed.Send(core.NewTxsEvent{Txs: fullAdds})
}
// -------- BLOCKNATIVE MODIFICATION STOP -------------

if len(adds) > 0 {
p.discoverFeed.Send(core.NewTxsEvent{Txs: adds})
}

return errs
}

Expand Down

0 comments on commit 2242e63

Please sign in to comment.