core: eth: rpc: implement safe rpc block (#25165)

* core: eth: rpc: implement safe rpc block

* core: fix setHead, panics
This commit is contained in:
Marius van der Wijden
2022-07-25 18:42:05 +03:00
committed by GitHub
parent f543e6b065
commit c6dcd018d2
7 changed files with 73 additions and 5 deletions
+2
View File
@@ -235,6 +235,8 @@ func (api *ConsensusAPI) ForkchoiceUpdatedV1(update beacon.ForkchoiceStateV1, pa
log.Warn("Safe block not in canonical chain")
return beacon.STATUS_INVALID, beacon.InvalidForkChoiceState.With(errors.New("safe block not in canonical chain"))
}
// Set the safe block
api.eth.BlockChain().SetSafe(safeBlock)
}
// If payload generation was requested, create a new block to be potentially
// sealed by the beacon client. The payload will be requested later, and we