Merge branch 'hotfix/2'

poc8
obscuren 11 years ago
commit 7dae955c1a
  1. 8
      ethchain/block.go

@ -223,7 +223,15 @@ func (block *Block) SetTransactions(txs []*Transaction) {
trie.Update(strconv.Itoa(i), string(tx.RlpEncode())) trie.Update(strconv.Itoa(i), string(tx.RlpEncode()))
} }
switch trie.Root.(type) {
case string:
block.TxSha = []byte(trie.Root.(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 { func (block *Block) Value() *ethutil.Value {

Loading…
Cancel
Save