aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/geth/blocktest.go
diff options
context:
space:
mode:
authorGustav Simonsson <gustav.simonsson@gmail.com>2015-04-21 00:14:57 +0800
committerGustav Simonsson <gustav.simonsson@gmail.com>2015-04-21 11:23:10 +0800
commitb448390889685fc87f221c152b16b82849f7797f (patch)
tree99ab2230d8c2b744bf2201368bce0f2045aab944 /cmd/geth/blocktest.go
parent805345d13594b41e5dd2e4fed471c58c3775be9e (diff)
downloadgo-tangerine-b448390889685fc87f221c152b16b82849f7797f.tar.gz
go-tangerine-b448390889685fc87f221c152b16b82849f7797f.tar.zst
go-tangerine-b448390889685fc87f221c152b16b82849f7797f.zip
Further fixes to block test wrapper
* Move go test wrapper for block tests from cmd/geth to tests * Fix logic for when tests are valid or not, by adding correct validations for expected valid/invalid blocks * Change block insertion helper to work on single blocks * Add one test case for each file in BlockTests and comment out the tests which are currently failing * Add Skip call in all block tests in lieu of performance fixes around ethash cache which are needed before it will be fast enough to start / stop the node between each test
Diffstat (limited to 'cmd/geth/blocktest.go')
-rw-r--r--cmd/geth/blocktest.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/geth/blocktest.go b/cmd/geth/blocktest.go
index 792981ec0..343a0bf28 100644
--- a/cmd/geth/blocktest.go
+++ b/cmd/geth/blocktest.go
@@ -109,10 +109,10 @@ func runOneBlockTest(ctx *cli.Context, test *tests.BlockTest) (*eth.Ethereum, er
return ethereum, fmt.Errorf("InsertPreState: %v", err)
}
- // insert the test blocks, which will execute all transactions
- if err := test.InsertBlocks(ethereum.ChainManager()); err != nil {
- return ethereum, fmt.Errorf("Block Test load error: %v %T", err, err)
+ if err := test.TryBlocksInsert(ethereum.ChainManager()); err != nil {
+ return ethereum, fmt.Errorf("Block Test load error: %v", err)
}
+
fmt.Println("chain loaded")
if err := test.ValidatePostState(statedb); err != nil {
return ethereum, fmt.Errorf("post state validation failed: %v", err)