Merge remote-tracking branch 'upstream/develop' into feature/logging

This commit is contained in:
zelig
2014-06-25 16:13:27 +01:00
4 changed files with 48 additions and 6 deletions

View File

@ -597,7 +597,9 @@ func (vm *Vm) RunClosure(closure *Closure, hook DebugHook) (ret []byte, err erro
// Generate a new address
addr := ethutil.CreateAddress(closure.caller.Address(), closure.caller.N())
// Create a new contract
contract := NewContract(addr, value, []byte(""))
contract := vm.state.NewStateObject(addr)
contract.Amount = value
// Set the init script
contract.initScript = mem.Get(offset.Int64(), size.Int64())
// Transfer all remaining gas to the new