aboutsummaryrefslogtreecommitdiffstats
path: root/core/blockchain_test.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <geffobscura@gmail.com>2016-03-31 23:43:41 +0800
committerJeffrey Wilcke <geffobscura@gmail.com>2016-04-01 07:01:10 +0800
commit9055c16efad80d0c69992e7992083f967733aa9c (patch)
tree41de92819a7aa8182779e964cec75c0e54d8801f /core/blockchain_test.go
parentf0cbebb19f3137ee3ba0e66dadd1b5b9dbf98b1c (diff)
downloadgo-tangerine-9055c16efad80d0c69992e7992083f967733aa9c.tar
go-tangerine-9055c16efad80d0c69992e7992083f967733aa9c.tar.gz
go-tangerine-9055c16efad80d0c69992e7992083f967733aa9c.tar.bz2
go-tangerine-9055c16efad80d0c69992e7992083f967733aa9c.tar.lz
go-tangerine-9055c16efad80d0c69992e7992083f967733aa9c.tar.xz
go-tangerine-9055c16efad80d0c69992e7992083f967733aa9c.tar.zst
go-tangerine-9055c16efad80d0c69992e7992083f967733aa9c.zip
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
Diffstat (limited to 'core/blockchain_test.go')
-rw-r--r--core/blockchain_test.go10
1 files changed, 4 insertions, 6 deletions
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)