Skip to content

Commit

Permalink
Attempt to fix travis build (dashpay#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
mariano54 authored Jun 27, 2019
1 parent 08ef32a commit c87e896
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 20 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
sudo: enabled
language: cpp
os: linux
dist: trusty
before_install:
- sudo add-apt-repository -y ppa:deadsnakes/ppa
- sudo apt-get update
Expand Down
6 changes: 6 additions & 0 deletions python-bindings/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,3 +175,9 @@ prepend_agg = PrependSignature.aggregate([prepend1, prepend2])
ok = prepend_agg.verify([Util.hash256(msg), Util.hash256(msg)], [pk1, pk2])

```

#### Publishing the library
```bash
python3 setup.py sdist bdist_wheel
twine upload dist/*
```
17 changes: 4 additions & 13 deletions python-impl/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,10 @@ def __pow__(self, other):
return Fq(self.Q, 1)
elif other == 1:
return self

el = self
multiply = []
while other > 1:
if other % 2 == 1:
multiply.append(el)
el = el * el
other = other // 2

for m in multiply:
el *= m

return el
elif other % 2 == 0:
return (self * self) ** (other // 2)
else:
return (self * self) ** (other // 2) * self

def qi_power(self, i):
return self
Expand Down
14 changes: 7 additions & 7 deletions python-impl/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from threshold import Threshold
from util import hash256

# setrecursionlimit(10**6)
setrecursionlimit(10**6)


def rand_scalar(ec=default_ec):
Expand Down Expand Up @@ -445,13 +445,13 @@ def test_threshold():
test_threshold_instance(T, 5)


# test_threshold()
test_threshold()
test_fields()
# test_ec()
# test_vectors()
# test_vectors2()
# test_vectors3()
# test_vectors4()
test_ec()
test_vectors()
test_vectors2()
test_vectors3()
test_vectors4()
test1()
test2()

Expand Down

0 comments on commit c87e896

Please sign in to comment.