This commit is contained in:
Vitalik Buterin 2013-12-19 21:28:47 -05:00
parent d712f93e66
commit 541c7ee446
1 changed files with 4 additions and 2 deletions

View File

@ -47,7 +47,7 @@ fees = {
} }
def eval_tx(block): def eval_tx(block):
tx = block.transactions[0] tx = block.transactions.pop(0)
oldbalance = block.get_balance(tx.from) oldbalance = block.get_balance(tx.from)
debit = tx.value + tx.fee debit = tx.value + tx.fee
if tx.to == '': if tx.to == '':
@ -56,7 +56,9 @@ def eval_tx(block):
return return
block.update_balance(tx.from,oldbalance - debit) block.update_balance(tx.from,oldbalance - debit)
if tx.to == '': if tx.to == '':
pass #todo: continue here mk_contract(block,tx) #todo: continue here
else:
block.update_balance(tx.to,block.get_balance(tx.to) + tx.value)
def mk_contract(block,tx): def mk_contract(block,tx):
cdata = tx.data cdata = tx.data