Skip to content

Commit

Permalink
adds reset method and dependency fix in setup
Browse files Browse the repository at this point in the history
  • Loading branch information
koshikraj committed Mar 18, 2018
1 parent fa3528b commit fb2c279
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions justblockchain/justblockchain.py
Expand Up @@ -35,6 +35,11 @@ def dict(self, chain):

return json.loads(json.dumps(chain, default=lambda o: o.__dict__))

def reset(self):
"""resets the blockchain blocks except genesis block"""

self._chain = [self._chain[0]]

def get_genesis_block(self):
"""creates first block of the chain"""

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -11,7 +11,7 @@
with open('HISTORY.rst') as history_file:
history = history_file.read()

requirements = [ ]
requirements = ['pycryptodome']

setup_requirements = ['pytest-runner', ]

Expand Down

0 comments on commit fb2c279

Please sign in to comment.