Skip to content

Commit

Permalink
'Refactored by Sourcery'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sourcery AI committed Aug 29, 2020
1 parent b889b0b commit 0c5330a
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions btclib/curvemult2.py
Expand Up @@ -259,11 +259,7 @@ def _mult_sliding_window(m: int, w: int, Q: JacPoint, ec: CurveGroup) -> JacPoin
R = _double_jac(R, ec)
i += 1
else:
if (len(M) - i) < w:
j = len(M) - i
else:
j = w

j = min(len(M) - i, w)
t = M[i]
for a in range(1, j):
t = 2 * t + M[i + a]
Expand Down Expand Up @@ -346,11 +342,11 @@ def _mult_w_NAF(m: int, w: int, Q: JacPoint, ec: CurveGroup) -> JacPoint:
while m > 0:
if (m % 2) == 1:
M.append(mods(m, w))
m = m - M[i]
m -= M[i]
else:
M.append(0)
m = m // 2
i = i + 1
m //= 2
i += 1

p = i

Expand Down

0 comments on commit 0c5330a

Please sign in to comment.