Skip to content

Commit

Permalink
feat: hydrate block from context
Browse files Browse the repository at this point in the history
  • Loading branch information
crisog committed Aug 1, 2024
1 parent 5135ff6 commit 54c1fea
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ghost-crab/src/block_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ pub struct BlockContext {
}

impl BlockContext {
pub async fn block(&self) -> Result<Option<Block>, TransportError> {
self.provider.get_block_by_number(BlockNumberOrTag::Number(self.block_number), false).await
pub async fn block(&self, hydrate: bool) -> Result<Option<Block>, TransportError> {
self.provider
.get_block_by_number(BlockNumberOrTag::Number(self.block_number), hydrate)
.await
}
}

Expand Down

0 comments on commit 54c1fea

Please sign in to comment.