Skip to content

Commit 82ac471

Browse files
committed
Merge pull request #867 from Gustav-Simonsson/fix_block_tests_genesis_block_total_difficulty
Fix block tests genesis block total difficulty
2 parents a0cb194 + 7bc1f48 commit 82ac471

File tree

3 files changed

+1
-4
lines changed

3 files changed

+1
-4
lines changed

cmd/geth/blocktest.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ func runOneBlockTest(ctx *cli.Context, test *tests.BlockTest) (*eth.Ethereum, er
113113
return ethereum, fmt.Errorf("Block Test load error: %v", err)
114114
}
115115

116-
fmt.Println("chain loaded")
117116
if err := test.ValidatePostState(statedb); err != nil {
118117
return ethereum, fmt.Errorf("post state validation failed: %v", err)
119118
}

core/chain_manager.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,7 @@ func (bc *ChainManager) ResetWithGenesisBlock(gb *types.Block) {
320320
}
321321

322322
// Prepare the genesis block
323+
gb.Td = gb.Difficulty()
323324
bc.genesisBlock = gb
324325
bc.write(bc.genesisBlock)
325326
bc.insert(bc.genesisBlock)

tests/block_test.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@ func TestBcValidBlockTests(t *testing.T) {
1717
}
1818

1919
func TestBcUncleTests(t *testing.T) {
20-
t.Skip("Skipped until https://github.com/ethereum/go-ethereum/pull/857 is merged.")
2120
runBlockTestsInFile("files/BlockTests/bcUncleTest.json", []string{}, t)
2221
}
2322

2423
func TestBcUncleHeaderValidityTests(t *testing.T) {
25-
t.Skip("Skipped until https://github.com/ethereum/go-ethereum/pull/857 is merged.")
2624
runBlockTestsInFile("files/BlockTests/bcUncleHeaderValiditiy.json", []string{}, t)
2725
}
2826

@@ -39,7 +37,6 @@ func TestBcJSAPITests(t *testing.T) {
3937
}
4038

4139
func TestBcRPCAPITests(t *testing.T) {
42-
t.Skip("Skipped until https://github.com/ethereum/go-ethereum/pull/857 is merged.")
4340
runBlockTestsInFile("files/BlockTests/bcRPC_API_Test.json", []string{}, t)
4441
}
4542

0 commit comments

Comments
 (0)