@@ -62,26 +62,28 @@ func generateTestChain() (*core.Genesis, []*types.Block) {
62
62
return genesis , blocks
63
63
}
64
64
65
+ // TODO (MariusVanDerWijden) reenable once engine api is updated to the latest spec
66
+ /*
65
67
func generateTestChainWithFork(n int, fork int) (*core.Genesis, []*types.Block, []*types.Block) {
66
68
if fork >= n {
67
69
fork = n - 1
68
70
}
69
71
db := rawdb.NewMemoryDatabase()
70
72
config := ¶ms.ChainConfig{
71
- ChainID : big .NewInt (1337 ),
72
- HomesteadBlock : big .NewInt (0 ),
73
- EIP150Block : big .NewInt (0 ),
74
- EIP155Block : big .NewInt (0 ),
75
- EIP158Block : big .NewInt (0 ),
76
- ByzantiumBlock : big .NewInt (0 ),
77
- ConstantinopleBlock : big .NewInt (0 ),
78
- PetersburgBlock : big .NewInt (0 ),
79
- IstanbulBlock : big .NewInt (0 ),
80
- MuirGlacierBlock : big .NewInt (0 ),
81
- BerlinBlock : big .NewInt (0 ),
82
- LondonBlock : big .NewInt (0 ),
83
- CatalystBlock : big .NewInt (0 ),
84
- Ethash : new (params.EthashConfig ),
73
+ ChainID: big.NewInt(1337),
74
+ HomesteadBlock: big.NewInt(0),
75
+ EIP150Block: big.NewInt(0),
76
+ EIP155Block: big.NewInt(0),
77
+ EIP158Block: big.NewInt(0),
78
+ ByzantiumBlock: big.NewInt(0),
79
+ ConstantinopleBlock: big.NewInt(0),
80
+ PetersburgBlock: big.NewInt(0),
81
+ IstanbulBlock: big.NewInt(0),
82
+ MuirGlacierBlock: big.NewInt(0),
83
+ BerlinBlock: big.NewInt(0),
84
+ LondonBlock: big.NewInt(0),
85
+ TerminalTotalDifficulty: big.NewInt(0),
86
+ Ethash: new(params.EthashConfig),
85
87
}
86
88
genesis := &core.Genesis{
87
89
Config: config,
@@ -105,6 +107,7 @@ func generateTestChainWithFork(n int, fork int) (*core.Genesis, []*types.Block,
105
107
forkedBlocks, _ := core.GenerateChain(config, blocks[fork], engine, db, n-fork, generateFork)
106
108
return genesis, blocks, forkedBlocks
107
109
}
110
+ */
108
111
109
112
func TestEth2AssembleBlock (t * testing.T ) {
110
113
genesis , blocks := generateTestChain ()
@@ -156,6 +159,8 @@ func TestEth2AssembleBlockWithAnotherBlocksTxs(t *testing.T) {
156
159
}
157
160
}
158
161
162
+ // TODO (MariusVanDerWijden) reenable once engine api is updated to the latest spec
163
+ /*
159
164
func TestEth2NewBlock(t *testing.T) {
160
165
genesis, blocks, forkedBlocks := generateTestChainWithFork(10, 4)
161
166
n, ethservice := startEthService(t, genesis, blocks[1:5])
@@ -216,6 +221,7 @@ func TestEth2NewBlock(t *testing.T) {
216
221
t.Fatalf("Wrong head after inserting fork %x != %x", exp, ethservice.BlockChain().CurrentBlock().Hash())
217
222
}
218
223
}
224
+ */
219
225
220
226
// startEthService creates a full node instance for testing.
221
227
func startEthService (t * testing.T , genesis * core.Genesis , blocks []* types.Block ) (* node.Node , * eth.Ethereum ) {
0 commit comments