Omnibus commited on
Commit
3b58eb0
·
1 Parent(s): 9053d54

Update mychain.py

Browse files
Files changed (1) hide show
  1. mychain.py +4 -3
mychain.py CHANGED
@@ -1,4 +1,4 @@
1
- mport os
2
  import json
3
  import hashlib
4
  import datetime
@@ -64,11 +64,12 @@ class MyChain:
64
  return block
65
  def print_previous_block(self):
66
  return self.chain[-1]
67
- def new_transaction(self, sender, recipient, amount):
68
  transaction = {
69
  'sender': sender,
70
  'recipient': recipient,
71
- 'amount': amount
 
72
  }
73
  self.pending_transactions.append(transaction)
74
  def proof_of_work(self, previous_proof):
 
1
+ import os
2
  import json
3
  import hashlib
4
  import datetime
 
64
  return block
65
  def print_previous_block(self):
66
  return self.chain[-1]
67
+ def new_transaction(self, sender, recipient, amount, balance):
68
  transaction = {
69
  'sender': sender,
70
  'recipient': recipient,
71
+ 'amount': amount,
72
+ 'balance': balance
73
  }
74
  self.pending_transactions.append(transaction)
75
  def proof_of_work(self, previous_proof):