diff options
Diffstat (limited to 'tests/block_test_util.go')
-rw-r--r-- | tests/block_test_util.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/block_test_util.go b/tests/block_test_util.go index 6a2eb96a4..3ee178e5f 100644 --- a/tests/block_test_util.go +++ b/tests/block_test_util.go @@ -146,7 +146,6 @@ func runBlockTests(bt map[string]*BlockTest, skipTests []string) error { } for name, test := range bt { - // if the test should be skipped, return if skipTest[name] { glog.Infoln("Skipping block test", name) continue @@ -192,6 +191,7 @@ func runBlockTest(test *BlockTest) error { } cm := ethereum.BlockChain() + //vm.Debug = true validBlocks, err := test.TryBlocksInsert(cm) if err != nil { return err @@ -292,12 +292,13 @@ func (t *BlockTest) TryBlocksInsert(blockchain *core.BlockChain) ([]btBlock, err } } // RLP decoding worked, try to insert into chain: - _, err = blockchain.InsertChain(types.Blocks{cb}) + blocks := types.Blocks{cb} + i, err := blockchain.InsertChain(blocks) if err != nil { if b.BlockHeader == nil { continue // OK - block is supposed to be invalid, continue with next block } else { - return nil, fmt.Errorf("Block insertion into chain failed: %v", err) + return nil, fmt.Errorf("Block #%v insertion into chain failed: %v", blocks[i].Number(), err) } } if b.BlockHeader == nil { |