mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-02 18:13:44 +00:00
fix : integration tests
This commit is contained in:
parent
b479b204a7
commit
6a2d94e215
3 changed files with 12 additions and 10 deletions
|
|
@ -67,7 +67,7 @@ var LightClientGPO = gasprice.Config{
|
|||
|
||||
// Defaults contains default settings for use on the Ethereum main net.
|
||||
var Defaults = Config{
|
||||
SyncMode: downloader.SnapSync,
|
||||
SyncMode: downloader.FullSync,
|
||||
NetworkId: 0, // enable auto configuration of networkID == chainID
|
||||
TxLookupLimit: 2350000,
|
||||
TransactionHistory: 2350000,
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ import (
|
|||
"github.com/ethereum/go-ethereum/params"
|
||||
"github.com/ethereum/go-ethereum/rlp"
|
||||
"github.com/ethereum/go-ethereum/tests/bor/mocks"
|
||||
"github.com/ethereum/go-ethereum/trie"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
@ -792,7 +793,7 @@ func TestEIP1559Transition(t *testing.T) {
|
|||
|
||||
gspec.Config.BerlinBlock = common.Big0
|
||||
gspec.Config.LondonBlock = common.Big0
|
||||
genesis := gspec.MustCommit(db)
|
||||
genesis := gspec.MustCommit(db, trie.NewDatabase(db, trie.HashDefaults))
|
||||
signer := types.LatestSigner(gspec.Config)
|
||||
|
||||
blocks, _ := core.GenerateChain(gspec.Config, genesis, engine, db, 1, func(i int, b *core.BlockGen) {
|
||||
|
|
@ -820,7 +821,7 @@ func TestEIP1559Transition(t *testing.T) {
|
|||
})
|
||||
|
||||
diskdb := rawdb.NewMemoryDatabase()
|
||||
gspec.MustCommit(diskdb)
|
||||
gspec.MustCommit(diskdb, trie.NewDatabase(diskdb, trie.HashDefaults))
|
||||
|
||||
chain, err := core.NewBlockChain(diskdb, nil, gspec, nil, engine, vm.Config{}, nil, nil, nil)
|
||||
if err != nil {
|
||||
|
|
@ -1015,7 +1016,7 @@ func TestBurnContract(t *testing.T) {
|
|||
"2": "0x000000000000000000000000000000000000aaad",
|
||||
"3": "0x000000000000000000000000000000000000aaae",
|
||||
}
|
||||
genesis := gspec.MustCommit(db)
|
||||
genesis := gspec.MustCommit(db, trie.NewDatabase(db, trie.HashDefaults))
|
||||
signer := types.LatestSigner(gspec.Config)
|
||||
|
||||
blocks, _ := core.GenerateChain(gspec.Config, genesis, engine, db, 1, func(i int, b *core.BlockGen) {
|
||||
|
|
@ -1043,7 +1044,7 @@ func TestBurnContract(t *testing.T) {
|
|||
})
|
||||
|
||||
diskdb := rawdb.NewMemoryDatabase()
|
||||
gspec.MustCommit(diskdb)
|
||||
gspec.MustCommit(diskdb, trie.NewDatabase(diskdb, trie.HashDefaults))
|
||||
|
||||
chain, err := core.NewBlockChain(diskdb, nil, gspec, nil, engine, vm.Config{}, nil, nil, nil)
|
||||
if err != nil {
|
||||
|
|
@ -1292,7 +1293,7 @@ func TestEIP1559TransitionWithEIP155(t *testing.T) {
|
|||
}
|
||||
)
|
||||
|
||||
genesis := gspec.MustCommit(db)
|
||||
genesis := gspec.MustCommit(db, trie.NewDatabase(db, trie.HashDefaults))
|
||||
|
||||
// Use signer without chain ID
|
||||
signer := types.HomesteadSigner{}
|
||||
|
|
@ -1365,7 +1366,7 @@ func TestTransitionWithoutEIP155(t *testing.T) {
|
|||
}
|
||||
)
|
||||
|
||||
genesis := gspec.MustCommit(db)
|
||||
genesis := gspec.MustCommit(db, trie.NewDatabase(db, trie.HashDefaults))
|
||||
|
||||
// Use signer without chain ID
|
||||
signer := types.HomesteadSigner{}
|
||||
|
|
@ -1397,7 +1398,7 @@ func TestTransitionWithoutEIP155(t *testing.T) {
|
|||
})
|
||||
|
||||
diskdb := rawdb.NewMemoryDatabase()
|
||||
gspec.MustCommit(diskdb)
|
||||
gspec.MustCommit(diskdb, trie.NewDatabase(diskdb, trie.HashDefaults))
|
||||
|
||||
chain, err := core.NewBlockChain(diskdb, nil, gspec, nil, engine, vm.Config{}, nil, nil, nil)
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ import (
|
|||
"github.com/ethereum/go-ethereum/p2p/enode"
|
||||
"github.com/ethereum/go-ethereum/params"
|
||||
"github.com/ethereum/go-ethereum/tests/bor/mocks"
|
||||
"github.com/ethereum/go-ethereum/trie"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
@ -127,14 +128,14 @@ func buildEthereumInstance(t *testing.T, db ethdb.Database) *initializeData {
|
|||
BorLogs: true,
|
||||
}
|
||||
|
||||
ethConf.Genesis.MustCommit(db)
|
||||
ethConf.Genesis.MustCommit(db, trie.NewDatabase(db, trie.HashDefaults))
|
||||
|
||||
ethereum := utils.CreateBorEthereum(ethConf)
|
||||
if err != nil {
|
||||
t.Fatalf("failed to register Ethereum protocol: %v", err)
|
||||
}
|
||||
|
||||
ethConf.Genesis.MustCommit(ethereum.ChainDb())
|
||||
ethConf.Genesis.MustCommit(ethereum.ChainDb(), trie.NewDatabase(ethereum.ChainDb(), trie.HashDefaults))
|
||||
|
||||
ethereum.Engine().(*bor.Bor).Authorize(addr, func(account accounts.Account, s string, data []byte) ([]byte, error) {
|
||||
return crypto.Sign(crypto.Keccak256(data), key)
|
||||
|
|
|
|||
Loading…
Reference in a new issue