Skip to content

Commit

Permalink
Make block.transactions reusable
Browse files Browse the repository at this point in the history
  • Loading branch information
alecalve committed Sep 24, 2016
1 parent cc336e7 commit af4ea5a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions blockchain_parser/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,9 @@ def n_transactions(self):

@property
def transactions(self):
"""Returns an iterator to the block's transactions represented
"""Returns a generator of the block's transactions represented
as Transaction objects"""
if self._transactions is None:
self._transactions = get_block_transactions(self.hex)
return self._transactions
return get_block_transactions(self.hex)

@property
def header(self):
Expand Down

0 comments on commit af4ea5a

Please sign in to comment.