Kernel: Python 3 (Anaconda)
In [2]:
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-2-10b9bad4efd2> in <module>()
1 import hashlib
2
----> 3 class chunk:
4
5 def __init__(self, index, data, previous):
<ipython-input-2-10b9bad4efd2> in chunk()
28 return Block(currentidx, currentdata, currenthash)
29
---> 30 blockchain = [rootblock()]
31 previousblock = blockchain[0]
32
<ipython-input-2-10b9bad4efd2> in rootblock()
16
17 def rootblock():
---> 18 return chunk(0, 'Root', '0')
19
20 def next(previousblock):
NameError: name 'chunk' is not defined
In [3]: