mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-20 14:28:37 +00:00
Merge branch 'gloas-containers' into gloas_envelope_processing_merge_containers
This commit is contained in:
@@ -164,11 +164,18 @@ pub enum Error {
|
||||
InvalidPayloadBody(String),
|
||||
InvalidPayloadConversion,
|
||||
InvalidBlobConversion(String),
|
||||
SszTypesError(ssz_types::Error),
|
||||
BeaconStateError(BeaconStateError),
|
||||
PayloadTypeMismatch,
|
||||
VerifyingVersionedHashes(versioned_hashes::Error),
|
||||
}
|
||||
|
||||
impl From<ssz_types::Error> for Error {
|
||||
fn from(e: ssz_types::Error) -> Self {
|
||||
Error::SszTypesError(e)
|
||||
}
|
||||
}
|
||||
|
||||
impl From<BeaconStateError> for Error {
|
||||
fn from(e: BeaconStateError) -> Self {
|
||||
Error::BeaconStateError(e)
|
||||
@@ -2219,6 +2226,7 @@ enum InvalidBuilderPayload {
|
||||
payload: u64,
|
||||
expected: u64,
|
||||
},
|
||||
SszTypesError(ssz_types::Error),
|
||||
}
|
||||
|
||||
impl fmt::Display for InvalidBuilderPayload {
|
||||
@@ -2260,6 +2268,7 @@ impl fmt::Display for InvalidBuilderPayload {
|
||||
InvalidBuilderPayload::GasLimitMismatch { payload, expected } => {
|
||||
write!(f, "payload gas limit was {} not {}", payload, expected)
|
||||
}
|
||||
Self::SszTypesError(e) => write!(f, "{:?}", e),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2315,7 +2324,13 @@ fn verify_builder_bid<E: EthSpec>(
|
||||
.withdrawals()
|
||||
.ok()
|
||||
.cloned()
|
||||
.map(|withdrawals| Withdrawals::<E>::from(withdrawals).tree_hash_root());
|
||||
.map(|withdrawals| {
|
||||
Withdrawals::<E>::try_from(withdrawals)
|
||||
.map_err(InvalidBuilderPayload::SszTypesError)
|
||||
.map(|w| w.tree_hash_root())
|
||||
})
|
||||
.transpose()?;
|
||||
|
||||
let payload_withdrawals_root = header.withdrawals_root().ok();
|
||||
let expected_gas_limit = proposer_gas_limit
|
||||
.and_then(|target_gas_limit| expected_gas_limit(parent_gas_limit, target_gas_limit, spec));
|
||||
|
||||
Reference in New Issue
Block a user