Merge pull request #1397 from terencechain/patch-87

Remove `unpack_compact_validator` from sync spec
This commit is contained in:
Danny Ryan 2019-09-08 12:11:56 -06:00 committed by GitHub
commit 1f3a5b156f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 15 deletions

View File

@ -15,7 +15,6 @@
- [`LightClientUpdate`](#lightclientupdate)
- [Helpers](#helpers)
- [`LightClientMemory`](#lightclientmemory)
- [`unpack_compact_validator`](#unpack_compact_validator)
- [`get_persistent_committee_pubkeys_and_balances`](#get_persistent_committee_pubkeys_and_balances)
- [Light client state updates](#light-client-state-updates)
- [Data overhead](#data-overhead)
@ -77,20 +76,6 @@ class LightClientMemory(object):
next_committee: CompactCommittee
```
### `unpack_compact_validator`
```python
def unpack_compact_validator(compact_validator: CompactValidator) -> Tuple[ValidatorIndex, bool, uint64]:
"""
Return the index, slashed, effective_balance // EFFECTIVE_BALANCE_INCREMENT of ``compact_validator``.
"""
return (
ValidatorIndex(compact_validator >> 16),
bool((compact_validator >> 15) % 2),
uint64(compact_validator & (2**15 - 1)),
)
```
### `get_persistent_committee_pubkeys_and_balances`
```python