mirror of
https://github.com/bitcoin/bips.git
synced 2026-03-23 16:05:41 +00:00
BIPs 119, 330, 352: code typo and style fixups
Co-authored-by: Tomass <155266802+zeroprooff@users.noreply.github.com> Co-authored-by: emmmm <155267286+eeemmmmmm@users.noreply.github.com>
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import random
|
||||
|
||||
######## ENCODING and DECODING ########
|
||||
|
||||
FIELD_BITS = 32
|
||||
@@ -31,8 +33,6 @@ def sketch(shortids, capacity):
|
||||
|
||||
######## DECODING only ########
|
||||
|
||||
import random
|
||||
|
||||
def inv(x):
|
||||
"""Compute 1/x in GF(2^FIELD_BITS)"""
|
||||
t = x
|
||||
@@ -154,4 +154,3 @@ def decode(sketch):
|
||||
else:
|
||||
sums.append(odd_sums[(i+1)//2])
|
||||
return find_roots(list(reversed(berlekamp_massey(sums))))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user