mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-12-01 20:05:43 +03:00
get slots for overflow challenge block (#1305)
This commit is contained in:
parent
00e864b98d
commit
83ef5ee387
@ -296,8 +296,16 @@ class WeightProofHandler:
|
||||
curr_sub_rec = blocks[curr_sub_rec.prev_hash]
|
||||
first_rc_end_of_slot_vdf = self.first_rc_end_of_slot_vdf(header_block, blocks, header_blocks)
|
||||
else:
|
||||
while not curr_sub_rec.first_in_sub_slot and curr_sub_rec.height > 0:
|
||||
curr_sub_rec = blocks[curr_sub_rec.prev_hash]
|
||||
if header_block_sub_rec.overflow and header_block_sub_rec.first_in_sub_slot:
|
||||
sub_slots_num = 2
|
||||
while sub_slots_num > 0 and curr_sub_rec.height > 0:
|
||||
curr_sub_rec = blocks[curr_sub_rec.prev_hash]
|
||||
if curr_sub_rec.first_in_sub_slot:
|
||||
assert curr_sub_rec.finished_challenge_slot_hashes is not None
|
||||
sub_slots_num -= len(curr_sub_rec.finished_challenge_slot_hashes)
|
||||
else:
|
||||
while not curr_sub_rec.first_in_sub_slot and curr_sub_rec.height > 0:
|
||||
curr_sub_rec = blocks[curr_sub_rec.prev_hash]
|
||||
|
||||
curr = header_blocks[curr_sub_rec.header_hash]
|
||||
sub_slots_data: List[SubSlotData] = []
|
||||
|
Loading…
Reference in New Issue
Block a user