Minor fixes

This commit is contained in:
Hsiao-Wei Wang 2020-12-11 16:10:50 +08:00 committed by protolambda
parent 2190c13858
commit 1ce25c19e8
No known key found for this signature in database
GPG Key ID: EC89FDBB2B4C7623
2 changed files with 37 additions and 9 deletions

View File

@ -10,9 +10,44 @@
- [Introduction](#introduction)
- [Custom types](#custom-types)
- [Configuration](#configuration)
- [Misc](#misc)
- [Shard block configs](#shard-block-configs)
- [Precomputed size verification points](#precomputed-size-verification-points)
- [Gwei values](#gwei-values)
- [Time parameters](#time-parameters)
- [Domain types](#domain-types)
- [Updated containers](#updated-containers)
- [`AttestationData`](#attestationdata)
- [`BeaconBlock`](#beaconblock)
- [`BeaconState`](#beaconstate)
- [New containers](#new-containers)
- [`DataCommitment`](#datacommitment)
- [`ShardHeader`](#shardheader)
- [`PendingShardHeader`](#pendingshardheader)
- [Helper functions](#helper-functions)
- [Misc](#misc-1)
- [`compute_previous_slot`](#compute_previous_slot)
- [`compute_shard_from_committee_index`](#compute_shard_from_committee_index)
- [`compute_updated_gasprice`](#compute_updated_gasprice)
- [`compute_committee_source_epoch`](#compute_committee_source_epoch)
- [Beacon state accessors](#beacon-state-accessors)
- [Updated `get_committee_count_per_slot`](#updated-get_committee_count_per_slot)
- [`get_active_shard_count`](#get_active_shard_count)
- [`get_shard_committee`](#get_shard_committee)
- [`get_shard_proposer_index`](#get_shard_proposer_index)
- [`get_start_shard`](#get_start_shard)
- [Predicates](#predicates)
- [Block processing](#block-processing)
- [Operations](#operations)
- [New Attestation processing](#new-attestation-processing)
- [Updated `process_attestation`](#updated-process_attestation)
- [`update_pending_votes`](#update_pending_votes)
- [`process_shard_header`](#process_shard_header)
- [Shard transition processing](#shard-transition-processing)
- [Epoch transition](#epoch-transition)
- [Pending headers](#pending-headers)
- [Phase 1 final updates](#phase-1-final-updates)
- [Custody game updates](#custody-game-updates)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
@ -551,7 +586,7 @@ def reset_pending_headers(state: BeaconState):
)
state.current_epoch_pending_headers = []
# Add dummy "empty" PendingAttestations
# (default to vote for if no shard header availabl)
# (default to vote for if no shard header available)
for slot in range(SLOTS_IN_EPOCH):
for index in range(get_committee_count_per_slot(get_current_epoch(state))):
shard = compute_shard_from_committee_index(state, index, slot)

View File

@ -8,14 +8,7 @@
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
- [Introduction](#introduction)
- [Updated data structures](#updated-data-structures)
- [Extended `Store`](#extended-store)
- [New data structures](#new-data-structures)
- [`ShardLatestMessage`](#shardlatestmessage)
- [`ShardStore`](#shardstore)
- [Updated helpers](#updated-helpers)
- [Updated `get_forkchoice_store`](#updated-get_forkchoice_store)
- [Updated `update_latest_messages`](#updated-update_latest_messages)
- [Dependency calculation](#dependency-calculation)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
<!-- /TOC -->