Creating a simple Blockchain in Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Blockchain(object): | |
def __init__(self): | |
self.current_transactions = [] | |
self.chain = [] | |
def new_block(self): | |
# Creates a new Block in the Blockchain | |
pass | |
def new_transaction(self): | |
# Creates a new transaction to go into the next mined Block | |
pass | |
@property | |
def last_block(self): | |
return self.chain[-1] | |
@staticmethod | |
def hash(block): | |
# Creates the hash of a Block | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment