mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2024-12-28 14:27:16 +00:00
Fixed casting issue
This commit is contained in:
parent
e837c9ab3f
commit
3b38df085e
@ -223,7 +223,15 @@ func (block *Block) SetTransactions(txs []*Transaction) {
|
||||
trie.Update(strconv.Itoa(i), string(tx.RlpEncode()))
|
||||
}
|
||||
|
||||
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user