mirror of
https://github.com/status-im/eth2.0-specs.git
synced 2025-01-13 04:04:19 +00:00
Merge pull request #1397 from terencechain/patch-87
Remove `unpack_compact_validator` from sync spec
This commit is contained in:
commit
1f3a5b156f
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user