Skip to content
This repository was archived by the owner on May 11, 2024. It is now read-only.

Commit 3b4c4b7

Browse files
committed
feat: update tests
1 parent 40f030f commit 3b4c4b7

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

internal/testutils/helper.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import (
1818
"github.com/ethereum/go-ethereum/common/hexutil"
1919
"github.com/ethereum/go-ethereum/core/types"
2020
"github.com/ethereum/go-ethereum/log"
21+
"github.com/ethereum/go-ethereum/params"
2122
"github.com/ethereum/go-ethereum/rlp"
2223
"github.com/go-resty/resty/v2"
2324
"github.com/phayes/freeport"
@@ -130,7 +131,7 @@ func (s *ClientTestSuite) ProposeAndInsertValidBlock(
130131
common.BytesToAddress(RandomBytes(32)),
131132
common.Big1,
132133
100000,
133-
baseFeeInfo.Basefee,
134+
new(big.Int).SetUint64(uint64(10*params.GWei)+baseFeeInfo.Basefee.Uint64()),
134135
[]byte{},
135136
)
136137
signedTx, err := types.SignTx(tx, types.LatestSignerForChainID(s.RPCClient.L2.ChainID), s.TestAddrPrivKey)
@@ -198,7 +199,7 @@ func (s *ClientTestSuite) ProposeValidBlock(
198199
common.BytesToAddress(RandomBytes(32)),
199200
common.Big1,
200201
100000,
201-
baseFeeInfo.Basefee,
202+
new(big.Int).SetUint64(uint64(10*params.GWei)+baseFeeInfo.Basefee.Uint64()),
202203
[]byte{},
203204
)
204205
signedTx, err := types.SignTx(tx, types.LatestSignerForChainID(s.RPCClient.L2.ChainID), s.TestAddrPrivKey)

pkg/rpc/utils_test.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@ package rpc
22

33
import (
44
"context"
5+
"math/big"
56
"os"
67
"strconv"
78
"testing"
89

910
"github.com/ethereum/go-ethereum/common"
1011
"github.com/ethereum/go-ethereum/core/types"
1112
"github.com/ethereum/go-ethereum/crypto"
13+
"github.com/ethereum/go-ethereum/params"
1214
"github.com/stretchr/testify/require"
1315
)
1416

@@ -42,7 +44,7 @@ func TestL1ContentFrom(t *testing.T) {
4244
testAddr,
4345
common.Big1,
4446
100000,
45-
baseFeeInfo.Basefee,
47+
new(big.Int).SetUint64(uint64(10*params.GWei)+baseFeeInfo.Basefee.Uint64()),
4648
[]byte{},
4749
)
4850
signedTx, err := types.SignTx(tx, types.LatestSignerForChainID(client.L2.ChainID), testAddrPrivKey)

pkg/txlist_validator/tx_list_validator_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ func rlpEncodedTransactionBytes(l int, signed bool) []byte {
9191

9292
tx = types.MustSignNewTx(testKey, types.LatestSigner(genesis.Config), txData)
9393
} else {
94-
tx = types.NewTransaction(1, testAddr, common.Big1, 10, common.Big256, nil)
94+
tx = types.NewTransaction(1, testAddr, common.Big1, 10, new(big.Int).SetUint64(10*params.GWei), nil)
9595
}
9696
txs = append(
9797
txs,

0 commit comments

Comments
 (0)