diff options
author | obscuren <geffobscura@gmail.com> | 2014-05-21 18:39:07 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-05-21 18:39:07 +0800 |
commit | 2667cb3ab69271604262e809927f7ab25dafa93e (patch) | |
tree | dd5b75e2149a6ed7c6487f57b506fd289ee8dcf9 /ethchain | |
parent | 0c27c5eb7fd4cea3ccdf26096a47ed91b0e9b848 (diff) | |
download | dexon-2667cb3ab69271604262e809927f7ab25dafa93e.tar.gz dexon-2667cb3ab69271604262e809927f7ab25dafa93e.tar.zst dexon-2667cb3ab69271604262e809927f7ab25dafa93e.zip |
Apply to parent
Diffstat (limited to 'ethchain')
-rw-r--r-- | ethchain/state_manager.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ethchain/state_manager.go b/ethchain/state_manager.go index 8c442cf44..9fe485b7a 100644 --- a/ethchain/state_manager.go +++ b/ethchain/state_manager.go @@ -123,8 +123,7 @@ func (sm *StateManager) ApplyTransaction(state *State, block *Block, tx *Transac } else { err := sm.Ethereum.TxPool().ProcessTransaction(tx, block, false) contract := state.GetStateObject(tx.Recipient) - ethutil.Config.Log.Debugf("contract recip %x\n", tx.Recipient) - if err == nil && len(contract.Script()) > 0 { + if err == nil && contract != nil && len(contract.Script()) > 0 { sm.EvalScript(state, contract.Script(), contract, tx, block) } else if err != nil { ethutil.Config.Log.Infoln("[STATE] process:", err) @@ -168,7 +167,7 @@ func (sm *StateManager) ProcessBlock(state *State, parent, block *Block, dontRea } // Process the transactions on to current block - sm.ApplyTransactions(state, sm.bc.CurrentBlock, block.Transactions()) + sm.ApplyTransactions(state, parent, block.Transactions()) // Block validation if err := sm.ValidateBlock(block); err != nil { |