Skip to content

Commit

Permalink
Merge pull request #169 from xeroc/fixes-for-python-3-7
Browse files Browse the repository at this point in the history
Fixes for python 3 7
  • Loading branch information
xeroc authored Jun 18, 2020
2 parents e737c99 + 35789e9 commit 39ed412
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions graphenecommon/aio/blockchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ async def blocks(self, start=None, stop=None):
start = head_block + 1

if stop and start > stop:
# raise StopIteration
return

# Sleep for one block
Expand Down Expand Up @@ -265,12 +264,12 @@ async def get_all_accounts(self, start="", stop="", steps=1e3, **kwargs):
for account in ret:
yield account[0]
if account[0] == stop:
raise StopIteration
return
if lastname == ret[-1][0]:
raise StopIteration
return
lastname = ret[-1][0]
if len(ret) < steps:
raise StopIteration
return

@property
async def participation_rate(self):
Expand Down
7 changes: 3 additions & 4 deletions graphenecommon/blockchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ def blocks(self, start=None, stop=None):
start = head_block + 1

if stop and start > stop:
# raise StopIteration
return

# Sleep for one block
Expand Down Expand Up @@ -285,12 +284,12 @@ def get_all_accounts(self, start="", stop="", steps=1e3, **kwargs):
for account in ret:
yield account[0]
if account[0] == stop:
raise StopIteration
return
if lastname == ret[-1][0]:
raise StopIteration
return
lastname = ret[-1][0]
if len(ret) < steps:
raise StopIteration
return

@property
def participation_rate(self):
Expand Down

0 comments on commit 39ed412

Please sign in to comment.