aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/state_transition.go
diff options
context:
space:
mode:
Diffstat (limited to 'ethchain/state_transition.go')
-rw-r--r--ethchain/state_transition.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/ethchain/state_transition.go b/ethchain/state_transition.go
index 096464963..fbb729950 100644
--- a/ethchain/state_transition.go
+++ b/ethchain/state_transition.go
@@ -292,9 +292,9 @@ func (self *StateTransition) Eval(msg *ethstate.Message, script []byte, context
func MakeContract(tx *Transaction, state *ethstate.State) *ethstate.StateObject {
// Create contract if there's no recipient
if tx.IsContract() {
- addr := tx.CreationAddress()
+ addr := tx.CreationAddress(state)
- contract := state.NewStateObject(addr)
+ contract := state.GetOrNewStateObject(addr)
contract.InitCode = tx.Data
contract.State = ethstate.New(ethtrie.New(ethutil.Config.Db, ""))