diff options
author | zelig <viktor.tron@gmail.com> | 2014-06-25 23:13:27 +0800 |
---|---|---|
committer | zelig <viktor.tron@gmail.com> | 2014-06-25 23:13:27 +0800 |
commit | 4141cc39d0aa3956313aa4aa912ad81858f9bbc3 (patch) | |
tree | 4ada58c75c1d82fc65cb6ef4e6ec48e0c8604993 /ethchain | |
parent | f58c7ac5a6f5d77649c1c07dce94bf6d5c146c31 (diff) | |
parent | d8c675afbf98178ffa447e4d36b77bbdad3f9ec0 (diff) | |
download | dexon-4141cc39d0aa3956313aa4aa912ad81858f9bbc3.tar.gz dexon-4141cc39d0aa3956313aa4aa912ad81858f9bbc3.tar.zst dexon-4141cc39d0aa3956313aa4aa912ad81858f9bbc3.zip |
Merge remote-tracking branch 'upstream/develop' into feature/logging
Diffstat (limited to 'ethchain')
-rw-r--r-- | ethchain/vm.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ethchain/vm.go b/ethchain/vm.go index 3a999f0a4..66005e814 100644 --- a/ethchain/vm.go +++ b/ethchain/vm.go @@ -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 |