From ad51c85e5d67ca2e64e95786e79d062c4467b4c1 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 20 May 2014 19:19:53 +0200 Subject: Fixed crash --- ethchain/block.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'ethchain/block.go') 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 { -- cgit v1.2.3