mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
trie: no getting hasher in fullNode.EncodeRLP
This commit is contained in:
parent
f59bd61282
commit
3f68009d62
1 changed files with 1 additions and 4 deletions
|
|
@ -54,10 +54,7 @@ var nilValueNode = valueNode(nil)
|
||||||
|
|
||||||
// EncodeRLP encodes a full node into the consensus RLP format.
|
// EncodeRLP encodes a full node into the consensus RLP format.
|
||||||
func (n *fullNode) EncodeRLP(w io.Writer) error {
|
func (n *fullNode) EncodeRLP(w io.Writer) error {
|
||||||
h := newHasher(false)
|
_, err := w.Write(n.encode(nil))
|
||||||
defer returnHasherToPool(h)
|
|
||||||
h.tmp = n.encode(h.tmp[:0])
|
|
||||||
_, err := w.Write(h.tmp)
|
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue