From d99cfee853498f4e72a3a786fcea775a09c83b5b Mon Sep 17 00:00:00 2001 From: ericsson Date: Sat, 24 Apr 2021 18:21:59 +0300 Subject: [PATCH] typing problem fixed: `get_total_balance` expected second argument to be of `Set[ValidatorIndex]` type, however, `Sequence` is passed --- specs/sharding/beacon-chain.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specs/sharding/beacon-chain.md b/specs/sharding/beacon-chain.md index 3cd262ed61..4b53c94ea9 100644 --- a/specs/sharding/beacon-chain.md +++ b/specs/sharding/beacon-chain.md @@ -539,7 +539,7 @@ def update_pending_votes(state: BeaconState, attestation: Attestation) -> None: participants = get_attesting_indices(state, attestation.data, pending_header.votes) participants_balance = get_total_balance(state, participants) full_committee = get_beacon_committee(state, attestation.data.slot, attestation.data.index) - full_committee_balance = get_total_balance(state, full_committee) + full_committee_balance = get_total_balance(state, set(full_committee)) if participants_balance * 3 >= full_committee_balance * 2: pending_header.confirmed = True ``` @@ -685,7 +685,7 @@ def process_pending_headers(state: BeaconState) -> None: full_committee = get_beacon_committee(state, slot, shard) # The set of voters who voted for each header (and their total balances) voting_sets = [ - [v for i, v in enumerate(full_committee) if c.votes[i]] + set(v for i, v in enumerate(full_committee) if c.votes[i]) for c in candidates ] voting_balances = [