Commit 6c7255cd authored by obscuren's avatar obscuren

Fixed a minor issue on crashed contracts

parent f2234264
......@@ -221,8 +221,9 @@ func (block *Block) Undo() {
func (block *Block) MakeContract(tx *Transaction) {
contract := MakeContract(tx, NewState(block.state))
block.contractStates[string(tx.Hash()[12:])] = contract.state
if contract != nil {
block.contractStates[string(tx.Hash()[12:])] = contract.state
}
}
/////// Block Encoding
......
package ethchain
import (
"fmt"
"github.com/ethereum/eth-go/ethutil"
"math/big"
)
......@@ -65,6 +66,8 @@ func MakeContract(tx *Transaction, state *State) *Contract {
state.trie.Update(string(addr), string(contract.RlpEncode()))
return contract
} else {
fmt.Println("NO CONTRACT")
}
return nil
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment