consensus/beacon: check that only the latest pow block is valid ttd block (#25187)

* consensus/beacon: check that only the latest pow block is valid ttd block

* consensus/beacon: move verification to async function

* consensus/beacon: fix verifyTerminalPoWBlock, add test cases

* consensus/beacon: cosmetic changes

* consensus/beacon: apply karalabe's fixes
This commit is contained in:
Marius van der Wijden
2022-06-29 15:13:19 +03:00
committed by GitHub
parent c2070f8d15
commit d12b1a91cd
4 changed files with 182 additions and 2 deletions
+2 -1
View File
@@ -107,7 +107,8 @@ func testHeaderVerificationForMerging(t *testing.T, isClique bool) {
Alloc: map[common.Address]GenesisAccount{
addr: {Balance: big.NewInt(1)},
},
BaseFee: big.NewInt(params.InitialBaseFee),
BaseFee: big.NewInt(params.InitialBaseFee),
Difficulty: new(big.Int),
}
copy(genspec.ExtraData[32:], addr[:])
genesis := genspec.MustCommit(testdb)