aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/block.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-02-24 20:15:34 +0800
committerobscuren <geffobscura@gmail.com>2014-02-24 20:15:34 +0800
commit6c7255cde2afdff7710af23c9830835398e6b43d (patch)
tree1173adf43af2f0d7fd10c8f2fa5b35bf9807c8ad /ethchain/block.go
parentf2234264ed255a8096c2eb29e1b5ddb120c5ca3f (diff)
downloaddexon-6c7255cde2afdff7710af23c9830835398e6b43d.tar
dexon-6c7255cde2afdff7710af23c9830835398e6b43d.tar.gz
dexon-6c7255cde2afdff7710af23c9830835398e6b43d.tar.bz2
dexon-6c7255cde2afdff7710af23c9830835398e6b43d.tar.lz
dexon-6c7255cde2afdff7710af23c9830835398e6b43d.tar.xz
dexon-6c7255cde2afdff7710af23c9830835398e6b43d.tar.zst
dexon-6c7255cde2afdff7710af23c9830835398e6b43d.zip
Fixed a minor issue on crashed contracts
Diffstat (limited to 'ethchain/block.go')
-rw-r--r--ethchain/block.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/ethchain/block.go b/ethchain/block.go
index 7ad9984be..472ae134a 100644
--- a/ethchain/block.go
+++ b/ethchain/block.go
@@ -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