internal/ethapi: fix panic in access list creation (#23133)

Fixes test failure in the last commit.
This commit is contained in:
Marius van der Wijden
2021-06-30 14:23:20 +02:00
committed by GitHub
parent ec88bd0cd0
commit e7c8693635
2 changed files with 6 additions and 6 deletions

View File

@ -40,7 +40,7 @@ import (
var (
testKey, _ = crypto.HexToECDSA("b71c71a67e1177ad4e901695e1b4b9ee17ae16c6668d313eac2f96dbcda3f291")
testAddr = crypto.PubkeyToAddress(testKey.PublicKey)
testBalance = big.NewInt(2e10)
testBalance = big.NewInt(2e15)
)
func newTestBackend(t *testing.T) (*node.Node, []*types.Block) {
@ -88,7 +88,7 @@ func generateTestChain() (*core.Genesis, []*types.Block) {
return genesis, blocks
}
func TestEthClient(t *testing.T) {
func TestGethClient(t *testing.T) {
backend, _ := newTestBackend(t)
client, err := backend.Attach()
if err != nil {
@ -159,7 +159,7 @@ func testAccessList(t *testing.T, client *rpc.Client) {
From: testAddr,
To: nil,
Gas: 100000,
GasPrice: big.NewInt(1),
GasPrice: big.NewInt(1000000000),
Value: big.NewInt(1),
Data: common.FromHex("0x608060806080608155fd"),
}
@ -286,7 +286,7 @@ func testCallContract(t *testing.T, client *rpc.Client) {
From: testAddr,
To: &common.Address{},
Gas: 21000,
GasPrice: big.NewInt(1),
GasPrice: big.NewInt(1000000000),
Value: big.NewInt(1),
}
// CallContract without override