diff --git a/contracts/near/eth-types/Cargo.toml b/contracts/near/eth-types/Cargo.toml index 868c2c46..43f2b59a 100644 --- a/contracts/near/eth-types/Cargo.toml +++ b/contracts/near/eth-types/Cargo.toml @@ -28,4 +28,5 @@ sha3 = "0.10.0" [features] default = ["eth2"] -eth2 = ["dep:eth2_ssz", "dep:eth2_ssz_derive", "dep:tree_hash", "dep:tree_hash_derive", "dep:eth2_serde_utils"] \ No newline at end of file +eth2 = ["dep:eth2_ssz", "dep:eth2_ssz_derive", "dep:tree_hash", "dep:tree_hash_derive", "dep:eth2_serde_utils"] +disable_check_header_hash = [] diff --git a/contracts/near/eth-types/src/lib.rs b/contracts/near/eth-types/src/lib.rs index c2fb72f6..be8b9fc4 100644 --- a/contracts/near/eth-types/src/lib.rs +++ b/contracts/near/eth-types/src/lib.rs @@ -272,6 +272,7 @@ impl RlpDecodable for BlockHeader { .into(), ); + #[cfg(not(feature = "disable_check_header_hash"))] if block_header.hash.unwrap() != near_keccak256(serialized.as_raw()).into() { return Err(RlpDecoderError::RlpInconsistentLengthAndData); }