From 526baf20fdec6e2a2641e7a6e03222c2d2c375e9 Mon Sep 17 00:00:00 2001 From: Jihoon Song Date: Sat, 30 Nov 2024 17:54:25 +0900 Subject: [PATCH] miner: include inclusion list transactions when building a payload --- miner/worker.go | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/miner/worker.go b/miner/worker.go index 11ce984e38..58db05a35b 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -526,6 +526,49 @@ func (miner *Miner) fillTransactions(interrupt *atomic.Int32, env *environment) return err } } + + // Filter out inclusion list transactions that are not included in the block. + isIncludedTx := make(map[common.Hash]bool) + for _, tx := range env.txs { + isIncludedTx[tx.Hash()] = true + } + + opts := &txpool.ValidationOptions{ + Config: miner.chainConfig, + Accept: 0 | + 1<