miner: fix TestBuildPayload sporadic failure (#29853)

miner: fix TestBuildPayload sporadic failure

Co-authored-by: steven <steven@stevendeMacBook-Pro.local>
This commit is contained in:
Steven Wang 2024-05-27 19:42:07 +08:00 committed by GitHub
parent 7224576fba
commit 1a4e4a4fe1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -141,7 +141,7 @@ func (b *testWorkerBackend) TxPool() *txpool.TxPool { return b.txPool }
func newTestWorker(t *testing.T, chainConfig *params.ChainConfig, engine consensus.Engine, db ethdb.Database, blocks int) (*Miner, *testWorkerBackend) {
backend := newTestWorkerBackend(t, chainConfig, engine, db, blocks)
backend.txPool.Add(pendingTxs, true, false)
backend.txPool.Add(pendingTxs, true, true)
w := New(backend, testConfig, engine)
return w, backend
}