Fix typos and make block hash calculation public (#5275)
* Fix typo in `verify_payload_block_hash` * Make calculate_execution_block_hash public again
This commit is contained in:
parent
3ab9d3a84e
commit
744c598b1c
@ -86,7 +86,7 @@ impl<'block, E: EthSpec> NewPayloadRequest<'block, E> {
|
|||||||
///
|
///
|
||||||
/// https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.2/specs/deneb/beacon-chain.md#modified-verify_and_notify_new_payload
|
/// https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.2/specs/deneb/beacon-chain.md#modified-verify_and_notify_new_payload
|
||||||
pub fn perform_optimistic_sync_verifications(&self) -> Result<(), Error> {
|
pub fn perform_optimistic_sync_verifications(&self) -> Result<(), Error> {
|
||||||
self.verfiy_payload_block_hash()?;
|
self.verify_payload_block_hash()?;
|
||||||
self.verify_versioned_hashes()?;
|
self.verify_versioned_hashes()?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
@ -98,7 +98,7 @@ impl<'block, E: EthSpec> NewPayloadRequest<'block, E> {
|
|||||||
///
|
///
|
||||||
/// Equivalent to `is_valid_block_hash` in the spec:
|
/// Equivalent to `is_valid_block_hash` in the spec:
|
||||||
/// https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.2/specs/deneb/beacon-chain.md#is_valid_block_hash
|
/// https://github.com/ethereum/consensus-specs/blob/v1.4.0-beta.2/specs/deneb/beacon-chain.md#is_valid_block_hash
|
||||||
pub fn verfiy_payload_block_hash(&self) -> Result<(), Error> {
|
pub fn verify_payload_block_hash(&self) -> Result<(), Error> {
|
||||||
let payload = self.execution_payload_ref();
|
let payload = self.execution_payload_ref();
|
||||||
let parent_beacon_block_root = self.parent_beacon_block_root().ok().cloned();
|
let parent_beacon_block_root = self.parent_beacon_block_root().ok().cloned();
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
use crate::payload_cache::PayloadCache;
|
use crate::payload_cache::PayloadCache;
|
||||||
use arc_swap::ArcSwapOption;
|
use arc_swap::ArcSwapOption;
|
||||||
use auth::{strip_prefix, Auth, JwtKey};
|
use auth::{strip_prefix, Auth, JwtKey};
|
||||||
|
pub use block_hash::calculate_execution_block_hash;
|
||||||
use builder_client::BuilderHttpClient;
|
use builder_client::BuilderHttpClient;
|
||||||
pub use engine_api::EngineCapabilities;
|
pub use engine_api::EngineCapabilities;
|
||||||
use engine_api::Error as ApiError;
|
use engine_api::Error as ApiError;
|
||||||
|
Loading…
Reference in New Issue
Block a user