eth/catalyst: update implementation to spec (#24802)

* eth/catalyst: return invalid payload attributes error

* eth/catalyst: implement LVH as specified, add tests

* eth/catalyst: return current block hash not header hash

* eth/catalyst: fix test

* eth/catalyst: bring error codes in line with spec
This commit is contained in:
Marius van der Wijden
2022-05-20 11:12:12 +03:00
committed by GitHub
parent 310f751639
commit 4a4d531052
4 changed files with 283 additions and 85 deletions
+1 -1
View File
@@ -161,7 +161,7 @@ func (api *ConsensusAPI) checkTerminalTotalDifficulty(head common.Hash) error {
}
td := api.les.BlockChain().GetTd(header.Hash(), header.Number.Uint64())
if td != nil && td.Cmp(api.les.BlockChain().Config().TerminalTotalDifficulty) < 0 {
return &beacon.InvalidTB
return errors.New("invalid ttd")
}
return nil
}