forked from cerc-io/plugeth
Merge pull request #867 from Gustav-Simonsson/fix_block_tests_genesis_block_total_difficulty
Fix block tests genesis block total difficulty
This commit is contained in:
commit
82ac4712f1
@ -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)
|
return ethereum, fmt.Errorf("Block Test load error: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println("chain loaded")
|
|
||||||
if err := test.ValidatePostState(statedb); err != nil {
|
if err := test.ValidatePostState(statedb); err != nil {
|
||||||
return ethereum, fmt.Errorf("post state validation failed: %v", err)
|
return ethereum, fmt.Errorf("post state validation failed: %v", err)
|
||||||
}
|
}
|
||||||
|
@ -320,6 +320,7 @@ func (bc *ChainManager) ResetWithGenesisBlock(gb *types.Block) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Prepare the genesis block
|
// Prepare the genesis block
|
||||||
|
gb.Td = gb.Difficulty()
|
||||||
bc.genesisBlock = gb
|
bc.genesisBlock = gb
|
||||||
bc.write(bc.genesisBlock)
|
bc.write(bc.genesisBlock)
|
||||||
bc.insert(bc.genesisBlock)
|
bc.insert(bc.genesisBlock)
|
||||||
|
@ -17,12 +17,10 @@ func TestBcValidBlockTests(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestBcUncleTests(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)
|
runBlockTestsInFile("files/BlockTests/bcUncleTest.json", []string{}, t)
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestBcUncleHeaderValidityTests(t *testing.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)
|
runBlockTestsInFile("files/BlockTests/bcUncleHeaderValiditiy.json", []string{}, t)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,7 +37,6 @@ func TestBcJSAPITests(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestBcRPCAPITests(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)
|
runBlockTestsInFile("files/BlockTests/bcRPC_API_Test.json", []string{}, t)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user