WriteForkchoiceHead for no-op FCUs (#4415)

* WriteForkchoiceHead for no-op FCUs

* Flip WriteForkchoiceHead & safeAndFinalizedBlocksAreCanonical
This commit is contained in:
Andrew Ashikhmin 2022-06-09 12:26:09 +02:00 committed by GitHub
parent 77e2934647
commit 27d652b2a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -260,6 +260,7 @@ func startHandlingForkChoice(
if currentHeadHash == headerHash { // no-op
log.Info(fmt.Sprintf("[%s] Fork choice no-op", s.LogPrefix()))
cfg.hd.BeaconRequestList.Remove(requestId)
rawdb.WriteForkchoiceHead(tx, forkChoice.HeadBlockHash)
canonical, err := safeAndFinalizedBlocksAreCanonical(forkChoice, s, tx, cfg, requestStatus == engineapi.New)
if err != nil {
log.Warn(fmt.Sprintf("[%s] Fork choice err", s.LogPrefix()), "err", err)