Last active
June 16, 2019 07:54
-
-
Save dvf/a1077719e36287659dccbe5a187c2e3f to your computer and use it in GitHub Desktop.
Blockchain: Step 1
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.chain = [] | |
self.current_transactions = [] | |
def new_block(self): | |
# Creates a new Block and adds it to the chain | |
pass | |
def new_transaction(self): | |
# Adds a new transaction to the list of transactions | |
pass | |
@staticmethod | |
def hash(block): | |
# Hashes a Block | |
pass | |
@property | |
def last_block(self): | |
# Returns the last Block in the chain | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment