trie: remove unused `buf` parameter (#16583)
This commit is contained in:
parent
852aa143ac
commit
cfe8f5fd94
|
@ -123,17 +123,17 @@ func decodeNode(hash, buf []byte, cachegen uint16) (node, error) {
|
||||||
}
|
}
|
||||||
switch c, _ := rlp.CountValues(elems); c {
|
switch c, _ := rlp.CountValues(elems); c {
|
||||||
case 2:
|
case 2:
|
||||||
n, err := decodeShort(hash, buf, elems, cachegen)
|
n, err := decodeShort(hash, elems, cachegen)
|
||||||
return n, wrapError(err, "short")
|
return n, wrapError(err, "short")
|
||||||
case 17:
|
case 17:
|
||||||
n, err := decodeFull(hash, buf, elems, cachegen)
|
n, err := decodeFull(hash, elems, cachegen)
|
||||||
return n, wrapError(err, "full")
|
return n, wrapError(err, "full")
|
||||||
default:
|
default:
|
||||||
return nil, fmt.Errorf("invalid number of list elements: %v", c)
|
return nil, fmt.Errorf("invalid number of list elements: %v", c)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func decodeShort(hash, buf, elems []byte, cachegen uint16) (node, error) {
|
func decodeShort(hash, elems []byte, cachegen uint16) (node, error) {
|
||||||
kbuf, rest, err := rlp.SplitString(elems)
|
kbuf, rest, err := rlp.SplitString(elems)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -155,7 +155,7 @@ func decodeShort(hash, buf, elems []byte, cachegen uint16) (node, error) {
|
||||||
return &shortNode{key, r, flag}, nil
|
return &shortNode{key, r, flag}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func decodeFull(hash, buf, elems []byte, cachegen uint16) (*fullNode, error) {
|
func decodeFull(hash, elems []byte, cachegen uint16) (*fullNode, error) {
|
||||||
n := &fullNode{flags: nodeFlag{hash: hash, gen: cachegen}}
|
n := &fullNode{flags: nodeFlag{hash: hash, gen: cachegen}}
|
||||||
for i := 0; i < 16; i++ {
|
for i := 0; i < 16; i++ {
|
||||||
cld, rest, err := decodeRef(elems, cachegen)
|
cld, rest, err := decodeRef(elems, cachegen)
|
||||||
|
|
Loading…
Reference in New Issue