Skip to content

Commit

Permalink
chore: debug instrumentation
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeshultz committed Dec 4, 2023
1 parent 4426342 commit 55c7f78
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions silverback/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,13 @@ async def _block_task(self, block_handler: AsyncTaskiqDecoratedTask):
logger.debug(f"Handling blocks via {sub_id}")

async for raw_block in self.subscriptions.get_subscription_data(sub_id):
logger.debug("Processing raw block:")
print(raw_block)

block = self.provider.network.ecosystem.decode_block(hexbytes_dict(raw_block))

logger.debug(f"Received block: {block.number or 'pending'}")

if block.number is not None:
await self._checkpoint(last_block_seen=block.number)

Expand Down

0 comments on commit 55c7f78

Please sign in to comment.