Merge pull request #1380 from terencechain/patch-84

Update `unpack_compact_validator` in sync protocol
This commit is contained in:
Danny Ryan 2019-08-27 10:39:50 -06:00 committed by GitHub
commit 07bbbf0de3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,7 +86,7 @@ def unpack_compact_validator(compact_validator: CompactValidator) -> Tuple[Valid
"""
return (
ValidatorIndex(compact_validator >> 16),
(compact_validator >> 15) % 2,
bool((compact_validator >> 15) % 2),
uint64(compact_validator & (2**15 - 1)),
)
```