Skip to content

Instantly share code, notes, and snippets.

Avatar

mega-byte2600

  • Berkeley, CA
View GitHub Profile
@mega-byte2600
mega-byte2600 / gist:ff9a11d006ef36caafa2ccc622dccd9a
Created Apr 29, 2018
<50 lines of py for sCoin blockchain by GeraldNash
View gist:ff9a11d006ef36caafa2ccc622dccd9a
from datetime import datetime
import hashlib as hasher
class Block:
def __init__(self, index, timestamp, data, previous_hash):
self.index = index
self.timestamp = timestamp
self.data = data
self.previous_hash = previous_hash
self.hash = self.hash_block()
You can’t perform that action at this time.