typing problem fixed: `get_total_balance` expected second argument to be of `Set[ValidatorIndex]` type, however, `Sequence` is passed
This commit is contained in:
parent
dcb013ccf2
commit
d99cfee853
|
@ -539,7 +539,7 @@ def update_pending_votes(state: BeaconState, attestation: Attestation) -> None:
|
||||||
participants = get_attesting_indices(state, attestation.data, pending_header.votes)
|
participants = get_attesting_indices(state, attestation.data, pending_header.votes)
|
||||||
participants_balance = get_total_balance(state, participants)
|
participants_balance = get_total_balance(state, participants)
|
||||||
full_committee = get_beacon_committee(state, attestation.data.slot, attestation.data.index)
|
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:
|
if participants_balance * 3 >= full_committee_balance * 2:
|
||||||
pending_header.confirmed = True
|
pending_header.confirmed = True
|
||||||
```
|
```
|
||||||
|
@ -685,7 +685,7 @@ def process_pending_headers(state: BeaconState) -> None:
|
||||||
full_committee = get_beacon_committee(state, slot, shard)
|
full_committee = get_beacon_committee(state, slot, shard)
|
||||||
# The set of voters who voted for each header (and their total balances)
|
# The set of voters who voted for each header (and their total balances)
|
||||||
voting_sets = [
|
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
|
for c in candidates
|
||||||
]
|
]
|
||||||
voting_balances = [
|
voting_balances = [
|
||||||
|
|
Loading…
Reference in New Issue