From 9055c16efad80d0c69992e7992083f967733aa9c Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Thu, 31 Mar 2016 17:43:41 +0200 Subject: accounts/a/b/backends, core: chain maker homestead block set to 0 The chain maker and the simulated backend now run with a homestead phase beginning at block 0 (i.e. there's no frontier). This commit also fixes up #2388 --- core/blockchain_test.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'core/blockchain_test.go') diff --git a/core/blockchain_test.go b/core/blockchain_test.go index 9e59b2ff6..876dd2ba1 100644 --- a/core/blockchain_test.go +++ b/core/blockchain_test.go @@ -1025,23 +1025,21 @@ func TestReorgSideEvent(t *testing.T) { evmux := &event.TypeMux{} blockchain, _ := NewBlockChain(db, testChainConfig(), FakePow{}, evmux) - chain, _ := GenerateChain(genesis, db, 3, func(i int, gen *BlockGen) { - if i == 2 { - gen.OffsetTime(9) - } - }) + chain, _ := GenerateChain(genesis, db, 3, func(i int, gen *BlockGen) {}) if _, err := blockchain.InsertChain(chain); err != nil { t.Fatalf("failed to insert chain: %v", err) } replacementBlocks, _ := GenerateChain(genesis, db, 4, func(i int, gen *BlockGen) { tx, err := types.NewContractCreation(gen.TxNonce(addr1), new(big.Int), big.NewInt(1000000), new(big.Int), nil).SignECDSA(key1) + if i == 2 { + gen.OffsetTime(-1) + } if err != nil { t.Fatalf("failed to create tx: %v", err) } gen.AddTx(tx) }) - subs := evmux.Subscribe(ChainSideEvent{}) if _, err := blockchain.InsertChain(replacementBlocks); err != nil { t.Fatalf("failed to insert chain: %v", err) -- cgit v1.2.3