forked from paradigmxyz/reth
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add error struct for checking builder submissions (paradigmxyz…
- Loading branch information
Showing
2 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
//! Error types for the relay. | ||
use alloy_primitives::B256; | ||
|
||
/// Error thrown by the `validateBuilderSubmission` endpoints if the message differs from payload. | ||
#[derive(Debug, thiserror::Error)] | ||
pub enum ValidateBuilderSubmissionEqualityError { | ||
/// Thrown if parent hash mismatches | ||
#[error("incorrect ParentHash {actual}, expected {expected}")] | ||
IncorrectParentHash { | ||
/// The expected parent hash | ||
expected: B256, | ||
/// The actual parent hash | ||
actual: B256, | ||
}, | ||
/// Thrown if block hash mismatches | ||
#[error("incorrect BlockHash {actual}, expected {expected}")] | ||
IncorrectBlockHash { | ||
/// The expected block hash | ||
expected: B256, | ||
/// The actual block hash | ||
actual: B256, | ||
}, | ||
/// Thrown if block hash mismatches | ||
#[error("incorrect GasLimit {actual}, expected {expected}")] | ||
IncorrectGasLimit { | ||
/// The expected gas limit | ||
expected: u64, | ||
/// The actual gas limit | ||
actual: B256, | ||
}, | ||
/// Thrown if block hash mismatches | ||
#[error("incorrect GasUsed {actual}, expected {expected}")] | ||
IncorrectGasUsed { | ||
/// The expected gas used | ||
expected: u64, | ||
/// The actual gas used | ||
actual: B256, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters