eth/catalyst: implement kintsugi spec v1.0.0-alpha.4 (#23984)

This PR implements the new kintsugi specification which can be found here: https://github.com/ethereum/execution-apis/blob/v1.0.0-alpha.4/src/engine/specification.md
This commit is contained in:
Marius van der Wijden
2021-12-03 16:26:28 +01:00
committed by GitHub
parent 46f701ca93
commit 93f196c4b0
8 changed files with 259 additions and 180 deletions

View File

@ -1040,7 +1040,13 @@ func (w *worker) commit(uncles []*types.Header, interval func(), update bool, st
return err
}
if w.isRunning() && !w.merger.TDDReached() {
// If we're post merge, just ignore
td, ttd := w.chain.GetTd(block.ParentHash(), block.NumberU64()-1), w.chain.Config().TerminalTotalDifficulty
if td != nil && ttd != nil && td.Cmp(ttd) >= 0 {
return nil
}
if w.isRunning() {
if interval != nil {
interval()
}