Skip to content

Instantly share code, notes, and snippets.

View mega-byte2600's full-sized avatar

mega-byte2600

  • Berkeley, CA
View GitHub Profile
@mega-byte2600
mega-byte2600 / gist:ff9a11d006ef36caafa2ccc622dccd9a
Created April 29, 2018 01:20
<50 lines of py for sCoin blockchain by GeraldNash
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()