eth: fix test

This commit is contained in:
Gary Rong 2025-04-12 20:36:00 +08:00
parent e84fcef9e7
commit eb25e657e7

View file

@ -20,7 +20,9 @@ import (
"context" "context"
"crypto/ecdsa" "crypto/ecdsa"
"errors" "errors"
"fmt"
"math/big" "math/big"
"path/filepath"
"testing" "testing"
"time" "time"
@ -66,7 +68,8 @@ func initBackend(t *testing.T, withLocal bool) *EthAPIBackend {
txconfig := legacypool.DefaultConfig txconfig := legacypool.DefaultConfig
txconfig.Journal = "" // Don't litter the disk with test journals txconfig.Journal = "" // Don't litter the disk with test journals
blobPool := blobpool.New(blobpool.Config{Datadir: t.TempDir()}, chain, nil) dir := filepath.Join(t.TempDir(), fmt.Sprintf("withLocal%t", withLocal))
blobPool := blobpool.New(blobpool.Config{Datadir: dir}, chain, nil)
legacyPool := legacypool.New(txconfig, chain) legacyPool := legacypool.New(txconfig, chain)
txpool, _ := txpool.New(txconfig.PriceLimit, chain, []txpool.SubPool{legacyPool, blobPool}) txpool, _ := txpool.New(txconfig.PriceLimit, chain, []txpool.SubPool{legacyPool, blobPool})