Search winning 'empty' PendingShardHeader index by the empty DataCommitment instead of zero Root
This commit is contained in:
parent
2199b8e0f0
commit
dca6d3370a
|
@ -701,7 +701,7 @@ def process_pending_headers(state: BeaconState) -> None:
|
||||||
winning_index = voting_balances.index(max(voting_balances))
|
winning_index = voting_balances.index(max(voting_balances))
|
||||||
else:
|
else:
|
||||||
# If no votes, zero wins
|
# If no votes, zero wins
|
||||||
winning_index = [c.root for c in candidates].index(Root())
|
winning_index = [c.commitment for c in candidates].index(DataCommitment())
|
||||||
candidates[winning_index].confirmed = True
|
candidates[winning_index].confirmed = True
|
||||||
for slot_index in range(SLOTS_PER_EPOCH):
|
for slot_index in range(SLOTS_PER_EPOCH):
|
||||||
for shard in range(SHARD_COUNT):
|
for shard in range(SHARD_COUNT):
|
||||||
|
|
Loading…
Reference in New Issue