aboutsummaryrefslogtreecommitdiffstats
path: root/tests/block_test_util.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/block_test_util.go')
-rw-r--r--tests/block_test_util.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/block_test_util.go b/tests/block_test_util.go
index 473bc3419..6ba8f3d18 100644
--- a/tests/block_test_util.go
+++ b/tests/block_test_util.go
@@ -148,7 +148,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
@@ -185,6 +184,7 @@ func runBlockTest(test *BlockTest) error {
return err
}
cm := ethereum.BlockChain()
+ //vm.Debug = true
validBlocks, err := test.TryBlocksInsert(cm)
if err != nil {
return err
@@ -285,12 +285,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 {