From 2808409fbde922722e238ce319e57bb5046febc1 Mon Sep 17 00:00:00 2001 From: Gustav Simonsson Date: Wed, 6 May 2015 23:22:49 +0200 Subject: [PATCH 1/2] Add genesis block total difficulty in tests --- core/chain_manager.go | 1 + 1 file changed, 1 insertion(+) diff --git a/core/chain_manager.go b/core/chain_manager.go index 29830188e..0837c85be 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -320,6 +320,7 @@ func (bc *ChainManager) ResetWithGenesisBlock(gb *types.Block) { } // Prepare the genesis block + gb.Td = gb.Difficulty() bc.genesisBlock = gb bc.write(bc.genesisBlock) bc.insert(bc.genesisBlock) From 7bc1f487b866ed29b046a83a9c3bf4c5c839507c Mon Sep 17 00:00:00 2001 From: Gustav Simonsson Date: Wed, 6 May 2015 23:25:44 +0200 Subject: [PATCH 2/2] Unskip now working tests, remove debug print --- cmd/geth/blocktest.go | 1 - tests/block_test.go | 3 --- 2 files changed, 4 deletions(-) diff --git a/cmd/geth/blocktest.go b/cmd/geth/blocktest.go index 5c80ad07e..81a64b5f2 100644 --- a/cmd/geth/blocktest.go +++ b/cmd/geth/blocktest.go @@ -113,7 +113,6 @@ func runOneBlockTest(ctx *cli.Context, test *tests.BlockTest) (*eth.Ethereum, er 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) } diff --git a/tests/block_test.go b/tests/block_test.go index 2cf2da75c..8b1f76a92 100644 --- a/tests/block_test.go +++ b/tests/block_test.go @@ -17,12 +17,10 @@ func TestBcValidBlockTests(t *testing.T) { } func TestBcUncleTests(t *testing.T) { - t.Skip("Skipped until https://github.com/ethereum/go-ethereum/pull/857 is merged.") runBlockTestsInFile("files/BlockTests/bcUncleTest.json", []string{}, t) } func TestBcUncleHeaderValidityTests(t *testing.T) { - t.Skip("Skipped until https://github.com/ethereum/go-ethereum/pull/857 is merged.") runBlockTestsInFile("files/BlockTests/bcUncleHeaderValiditiy.json", []string{}, t) } @@ -39,7 +37,6 @@ func TestBcJSAPITests(t *testing.T) { } func TestBcRPCAPITests(t *testing.T) { - t.Skip("Skipped until https://github.com/ethereum/go-ethereum/pull/857 is merged.") runBlockTestsInFile("files/BlockTests/bcRPC_API_Test.json", []string{}, t) }