mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 22:56:43 +00:00
eth: fix test
This commit is contained in:
parent
eb25e657e7
commit
492003943f
1 changed files with 24 additions and 24 deletions
|
|
@ -20,9 +20,7 @@ import (
|
|||
"context"
|
||||
"crypto/ecdsa"
|
||||
"errors"
|
||||
"fmt"
|
||||
"math/big"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
|
|
@ -68,8 +66,7 @@ func initBackend(t *testing.T, withLocal bool) *EthAPIBackend {
|
|||
txconfig := legacypool.DefaultConfig
|
||||
txconfig.Journal = "" // Don't litter the disk with test journals
|
||||
|
||||
dir := filepath.Join(t.TempDir(), fmt.Sprintf("withLocal%t", withLocal))
|
||||
blobPool := blobpool.New(blobpool.Config{Datadir: dir}, chain, nil)
|
||||
blobPool := blobpool.New(blobpool.Config{Datadir: t.TempDir()}, chain, nil)
|
||||
legacyPool := legacypool.New(txconfig, chain)
|
||||
txpool, _ := txpool.New(txconfig.PriceLimit, chain, []txpool.SubPool{legacyPool, blobPool})
|
||||
|
||||
|
|
@ -129,8 +126,12 @@ func pricedSetCodeTxWithAuth(nonce uint64, gaslimit uint64, gasFee, tip *uint256
|
|||
})
|
||||
}
|
||||
|
||||
func TestLocalTxSend(t *testing.T) {
|
||||
for _, withLocal := range []bool{false, true} {
|
||||
func TestSendTx(t *testing.T) {
|
||||
testSendTx(t, false)
|
||||
testSendTx(t, true)
|
||||
}
|
||||
|
||||
func testSendTx(t *testing.T, withLocal bool) {
|
||||
b := initBackend(t, withLocal)
|
||||
|
||||
txA := pricedSetCodeTx(0, 250000, uint256.NewInt(params.GWei), uint256.NewInt(params.GWei), key, []unsignedAuth{
|
||||
|
|
@ -154,4 +155,3 @@ func TestLocalTxSend(t *testing.T) {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue