Skip to content

Commit c946ca8

Browse files
authored
fix: resharding (#20)
* fix: resharding * chore: silence linting error
1 parent cae96ed commit c946ca8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/near_lake_framework/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class LakeConfig:
5050
start_block_height: near_primitives.BlockHeight
5151
blocks_preload_pool_size: int
5252

53-
def __init__( # pylint: disable=too-many-arguments
53+
def __init__( # pylint: disable=too-many-arguments,too-many-positional-arguments
5454
self,
5555
network: Network,
5656
aws_access_key_id: str,

src/near_lake_framework/s3_fetchers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ async def fetch_streamer_message(
4141
block = near_primitives.Block.from_json(body)
4242

4343
shards_fetching = [
44-
fetch_shard_or_retry(s3_client, s3_bucket_name, block_height, shard_id)
45-
for shard_id in range(len(block.chunks))
44+
fetch_shard_or_retry(s3_client, s3_bucket_name, block_height, chunk.shard_id)
45+
for chunk in block.chunks
4646
]
4747
shards = await asyncio.gather(*shards_fetching)
4848

0 commit comments

Comments
 (0)