Commit 7dae955c authored by obscuren's avatar obscuren

Merge branch 'hotfix/2'

parents e837c9ab 3b38df08
......@@ -223,7 +223,15 @@ func (block *Block) SetTransactions(txs []*Transaction) {
trie.Update(strconv.Itoa(i), string(tx.RlpEncode()))
}
block.TxSha = []byte(trie.Root.(string))
switch trie.Root.(type) {
case string:
block.TxSha = []byte(trie.Root.(string))
case []byte:
block.TxSha = trie.Root.([]byte)
default:
panic(fmt.Sprintf("invalid root type %T", trie.Root))
}
}
func (block *Block) Value() *ethutil.Value {
......
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