mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
trie: remove redundant conversions (#1056)
This commit is contained in:
parent
aa7c8644c3
commit
c4a98d2ddb
2 changed files with 2 additions and 2 deletions
|
|
@ -99,7 +99,7 @@ func (n rawNode) cache() (hashNode, bool) { panic("this should never end up in
|
|||
func (n rawNode) fstring(ind string) string { panic("this should never end up in a live trie") }
|
||||
|
||||
func (n rawNode) EncodeRLP(w io.Writer) error {
|
||||
_, err := w.Write([]byte(n))
|
||||
_, err := w.Write(n)
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ func (it *nodeIterator) LeafKey() []byte {
|
|||
func (it *nodeIterator) LeafBlob() []byte {
|
||||
if len(it.stack) > 0 {
|
||||
if node, ok := it.stack[len(it.stack)-1].node.(valueNode); ok {
|
||||
return []byte(node)
|
||||
return node
|
||||
}
|
||||
}
|
||||
panic("not at leaf")
|
||||
|
|
|
|||
Loading…
Reference in a new issue