Skip to content

Commit

Permalink
constants.SUB_EPOCH_SUB_BLOCKS is 384 so won't fit in uint8
Browse files Browse the repository at this point in the history
  • Loading branch information
wjblanke authored and Yostra committed Jan 12, 2021
1 parent e26d199 commit c1d3fb7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/full_node/weight_proof.py
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ def get_last_ses_block_idx(
constants: ConsensusConstants, recent_reward_chain: List[ProofBlockHeader]
) -> Optional[ProofBlockHeader]:
for idx, block in enumerate(reversed(recent_reward_chain)):
if uint8(block.reward_chain_sub_block.sub_block_height % constants.SUB_EPOCH_SUB_BLOCKS) == 0:
if (block.reward_chain_sub_block.sub_block_height % constants.SUB_EPOCH_SUB_BLOCKS) == 0:
idx = len(recent_reward_chain) - 1 - idx # reverse
# find first block after sub slot end
while idx < len(recent_reward_chain):
Expand Down

0 comments on commit c1d3fb7

Please sign in to comment.