Revert "Search winning 'empty' PendingShardHeader index by the empty DataCommitment instead of zero Root"

This reverts commit dca6d337
This commit is contained in:
Anton Nashatyrev 2021-05-05 13:21:25 +03:00
parent ddc59422ba
commit befe4c7db3
1 changed files with 1 additions and 1 deletions

View File

@ -701,7 +701,7 @@ def process_pending_headers(state: BeaconState) -> None:
winning_index = voting_balances.index(max(voting_balances))
else:
# If no votes, zero wins
winning_index = [c.commitment for c in candidates].index(DataCommitment())
winning_index = [c.root for c in candidates].index(Root())
candidates[winning_index].confirmed = True
for slot_index in range(SLOTS_PER_EPOCH):
for shard in range(SHARD_COUNT):