Skip to content

Commit d6393f9

Browse files
author
Roman
committed
is blocks_since_last_step==0 then get_next_epoch_start_block returns None: Fixed
1 parent c8d3d59 commit d6393f9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

bittensor/core/async_subtensor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1796,7 +1796,7 @@ async def get_next_epoch_start_block(
17961796
netuid=netuid, block=block, block_hash=block_hash, reuse_block=reuse_block
17971797
)
17981798

1799-
if block and blocks_since_last_step and tempo:
1799+
if block and blocks_since_last_step is not None and tempo:
18001800
return block - blocks_since_last_step + tempo + 1
18011801
return None
18021802

bittensor/core/subtensor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1385,7 +1385,7 @@ def get_next_epoch_start_block(
13851385
blocks_since_last_step = self.blocks_since_last_step(netuid=netuid, block=block)
13861386
tempo = self.tempo(netuid=netuid, block=block)
13871387

1388-
if block and blocks_since_last_step and tempo:
1388+
if block and blocks_since_last_step is not None and tempo:
13891389
return block - blocks_since_last_step + tempo + 1
13901390
return None
13911391

0 commit comments

Comments
 (0)