Skip to content

Commit f76b714

Browse files
authored
Fix AttributeError: 'TzktDatasource' object has no attribute 'block' (#130)
1 parent 0b0d878 commit f76b714

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/dipdup/datasources/tzkt/datasource.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -705,12 +705,13 @@ async def _on_operation_message(self, message: List[Dict[str, Any]]) -> None:
705705

706706
async def _on_big_map_message(self, message: List[Dict[str, Any]]) -> None:
707707
"""Parse and emit raw big map diffs from WS"""
708-
async for _, data in self._extract_message_data('big_map', message):
708+
async for level, data in self._extract_message_data('big_map', message):
709+
block = await self._block_cache.get_block(level)
709710
big_maps = []
710711
for big_map_json in data:
711712
big_map = self.convert_big_map(big_map_json)
712713
big_maps.append(big_map)
713-
self.emit_big_maps(big_maps, self.block)
714+
self.emit_big_maps(big_maps, block)
714715

715716
async def _on_head_message(self, message: List[Dict[str, Any]]) -> None:
716717
async for _, data in self._extract_message_data('head', message):

0 commit comments

Comments
 (0)