Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions blockchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,18 @@ def new_block(self):
# Create a new block and add to blockchain
pass

def new_transaction(self):
def new_transaction(self, sender, recipient, amount):
# Add new transaction to list of transactions
pass
self.current_transactions.append({

'sender': sender,
'recipient': recipient,
'amount':amount,
})

return self.last_block['index'] +1


@staticmethod
def hash(block):
"""
Expand Down