aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/state_manager.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-05-20 17:19:07 +0800
committerobscuren <geffobscura@gmail.com>2014-05-20 17:19:07 +0800
commitfd19142c0db3d2b6651989f5389944f3e211d84f (patch)
tree96916597bc7366fad5043acb6df7a2711675f504 /ethchain/state_manager.go
parenta2fb265563a3a6eb80efc5720bb0c6f3fec6f397 (diff)
downloadgo-tangerine-fd19142c0db3d2b6651989f5389944f3e211d84f.tar
go-tangerine-fd19142c0db3d2b6651989f5389944f3e211d84f.tar.gz
go-tangerine-fd19142c0db3d2b6651989f5389944f3e211d84f.tar.bz2
go-tangerine-fd19142c0db3d2b6651989f5389944f3e211d84f.tar.lz
go-tangerine-fd19142c0db3d2b6651989f5389944f3e211d84f.tar.xz
go-tangerine-fd19142c0db3d2b6651989f5389944f3e211d84f.tar.zst
go-tangerine-fd19142c0db3d2b6651989f5389944f3e211d84f.zip
No longer store script directly in the state tree
Diffstat (limited to 'ethchain/state_manager.go')
-rw-r--r--ethchain/state_manager.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/ethchain/state_manager.go b/ethchain/state_manager.go
index 28570775b..098263e8a 100644
--- a/ethchain/state_manager.go
+++ b/ethchain/state_manager.go
@@ -87,7 +87,7 @@ func (sm *StateManager) BlockChain() *BlockChain {
func (sm *StateManager) MakeContract(state *State, tx *Transaction) *StateObject {
contract := MakeContract(tx, state)
if contract != nil {
- state.states[string(tx.Hash()[12:])] = contract.state
+ state.states[string(tx.CreationAddress())] = contract.state
return contract
}
@@ -117,7 +117,8 @@ func (sm *StateManager) ApplyTransactions(state *State, block *Block, txs []*Tra
}
} else {
err := sm.Ethereum.TxPool().ProcessTransaction(tx, block, false)
- contract := state.GetContract(tx.Recipient)
+ contract := state.GetStateObject(tx.Recipient)
+ ethutil.Config.Log.Debugf("contract recip %x\n", tx.Recipient)
if err == nil && len(contract.Script()) > 0 {
sm.EvalScript(state, contract.Script(), contract, tx, block)
} else if err != nil {