Add is_valid_terminal_block to EL

This commit is contained in:
Paul Hauner
2021-09-28 14:21:48 +10:00
parent 5323681204
commit dd570f4dec
3 changed files with 125 additions and 24 deletions

View File

@@ -21,6 +21,8 @@ pub enum Error {
Eip155Failure,
NoErrorOrResult,
IsSyncing,
ExecutionBlockNotFound(Hash256),
ExecutionHeadBlockNotFound,
}
impl From<reqwest::Error> for Error {
@@ -42,9 +44,12 @@ pub trait EngineApi {
async fn get_block_by_number<'a>(
&self,
block_by_number: BlockByNumberQuery<'a>,
) -> Result<ExecutionBlock, Error>;
) -> Result<Option<ExecutionBlock>, Error>;
async fn get_block_by_hash<'a>(&self, block_hash: Hash256) -> Result<ExecutionBlock, Error>;
async fn get_block_by_hash<'a>(
&self,
block_hash: Hash256,
) -> Result<Option<ExecutionBlock>, Error>;
async fn prepare_payload(
&self,