From 58ffc639fd9c331a9bd6ee10e75a890d33f2c639 Mon Sep 17 00:00:00 2001 From: Ethan Buchman Date: Tue, 9 Jun 2015 23:14:38 -0400 Subject: [PATCH] fix call --- state/execution.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/state/execution.go b/state/execution.go index 853af2ff3..65d161404 100644 --- a/state/execution.go +++ b/state/execution.go @@ -165,6 +165,7 @@ func getOrMakeOutputs(state AccountGetter, accounts map[string]*account.Account, accounts = make(map[string]*account.Account) } + // we should err if an account is being created but the inputs don't have permission var checkedCreatePerms bool for _, out := range outs { // Account shouldn't be duplicated @@ -463,14 +464,13 @@ func ExecTx(blockCache *BlockCache, tx_ types.Tx, runCall bool, evc events.Firea log.Debug(Fmt("Calling contract %X with code %X", callee.Address, callee.Code)) } else { callee = txCache.CreateAccount(caller) - txCache.UpdateAccount(callee) log.Debug(Fmt("Created new account %X", callee.Address)) code = tx.Data } log.Debug(Fmt("Code for this contract: %X", code)) txCache.UpdateAccount(caller) // because we bumped nonce - txCache.UpdateAccount(callee) // so the txCache knows about the callee and the transfer takes effect + txCache.UpdateAccount(callee) // so the txCache knows about the callee and the create and/or transfer takes effect vmach := vm.NewVM(txCache, params, caller.Address, account.HashSignBytes(_s.ChainID, tx)) vmach.SetFireable(evc)