mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 15:16:43 +00:00
eth/protocols/eth: polish test
This commit is contained in:
parent
a763bf1b8b
commit
65f31760a7
1 changed files with 4 additions and 8 deletions
|
|
@ -72,10 +72,7 @@ func newTestBackend(blocks int) *testBackend {
|
||||||
|
|
||||||
// newTestBackendWithGenerator creates a chain with a number of explicitly defined blocks and
|
// newTestBackendWithGenerator creates a chain with a number of explicitly defined blocks and
|
||||||
// wraps it into a mock backend.
|
// wraps it into a mock backend.
|
||||||
func newTestBackendWithGenerator(
|
func newTestBackendWithGenerator(blocks int, shanghai bool, cancun bool, generator func(int, *core.BlockGen)) *testBackend {
|
||||||
blocks int, shanghai bool, cancun bool,
|
|
||||||
generator func(int, *core.BlockGen),
|
|
||||||
) *testBackend {
|
|
||||||
var (
|
var (
|
||||||
// Create a database pre-initialize with a genesis block
|
// Create a database pre-initialize with a genesis block
|
||||||
db = rawdb.NewMemoryDatabase()
|
db = rawdb.NewMemoryDatabase()
|
||||||
|
|
@ -621,12 +618,11 @@ func testGetPooledTransaction(t *testing.T, blobTx bool) {
|
||||||
peer, _ := newTestPeer("peer", ETH68, backend)
|
peer, _ := newTestPeer("peer", ETH68, backend)
|
||||||
defer peer.close()
|
defer peer.close()
|
||||||
|
|
||||||
signer := types.NewCancunSigner(params.TestChainConfig.ChainID)
|
|
||||||
var (
|
var (
|
||||||
tx *types.Transaction
|
tx *types.Transaction
|
||||||
err error
|
err error
|
||||||
|
signer = types.NewCancunSigner(params.TestChainConfig.ChainID)
|
||||||
)
|
)
|
||||||
|
|
||||||
if blobTx {
|
if blobTx {
|
||||||
tx, err = types.SignNewTx(testKey, signer, &types.BlobTx{
|
tx, err = types.SignNewTx(testKey, signer, &types.BlobTx{
|
||||||
ChainID: uint256.MustFromBig(params.TestChainConfig.ChainID),
|
ChainID: uint256.MustFromBig(params.TestChainConfig.ChainID),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue