aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/block.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-05-21 01:19:53 +0800
committerobscuren <geffobscura@gmail.com>2014-05-21 01:19:53 +0800
commitad51c85e5d67ca2e64e95786e79d062c4467b4c1 (patch)
treeec5266983176f6583c8bb08d51467efeb9dd175a /ethchain/block.go
parent4b13f93a3e0f2901a8e1aa38dfef115e24c63ef0 (diff)
downloadgo-tangerine-ad51c85e5d67ca2e64e95786e79d062c4467b4c1.tar
go-tangerine-ad51c85e5d67ca2e64e95786e79d062c4467b4c1.tar.gz
go-tangerine-ad51c85e5d67ca2e64e95786e79d062c4467b4c1.tar.bz2
go-tangerine-ad51c85e5d67ca2e64e95786e79d062c4467b4c1.tar.lz
go-tangerine-ad51c85e5d67ca2e64e95786e79d062c4467b4c1.tar.xz
go-tangerine-ad51c85e5d67ca2e64e95786e79d062c4467b4c1.tar.zst
go-tangerine-ad51c85e5d67ca2e64e95786e79d062c4467b4c1.zip
Fixed crash
Diffstat (limited to 'ethchain/block.go')
-rw-r--r--ethchain/block.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/ethchain/block.go b/ethchain/block.go
index c6c2c1226..bdb243286 100644
--- a/ethchain/block.go
+++ b/ethchain/block.go
@@ -99,6 +99,9 @@ func CreateBlock(root interface{},
Time: time.Now().Unix(),
Extra: extra,
UncleSha: EmptyShaList,
+ GasUsed: new(big.Int),
+ MinGasPrice: new(big.Int),
+ GasLimit: new(big.Int),
contractStates: make(map[string]*ethutil.Trie),
}
block.SetTransactions(txes)
@@ -220,7 +223,7 @@ func (block *Block) SetTransactions(txs []*Transaction) {
trie.Update(strconv.Itoa(i), string(tx.RlpEncode()))
}
- block.TxSha = trie.Root.([]byte)
+ block.TxSha = []byte(trie.Root.(string))
}
func (block *Block) Value() *ethutil.Value {