Skip to content

Commit cfe8f5f

Browse files
xincaosukaralabe
authored andcommitted
trie: remove unused buf parameter (ethereum#16583)
1 parent 852aa14 commit cfe8f5f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

trie/node.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,17 +123,17 @@ func decodeNode(hash, buf []byte, cachegen uint16) (node, error) {
123123
}
124124
switch c, _ := rlp.CountValues(elems); c {
125125
case 2:
126-
n, err := decodeShort(hash, buf, elems, cachegen)
126+
n, err := decodeShort(hash, elems, cachegen)
127127
return n, wrapError(err, "short")
128128
case 17:
129-
n, err := decodeFull(hash, buf, elems, cachegen)
129+
n, err := decodeFull(hash, elems, cachegen)
130130
return n, wrapError(err, "full")
131131
default:
132132
return nil, fmt.Errorf("invalid number of list elements: %v", c)
133133
}
134134
}
135135

136-
func decodeShort(hash, buf, elems []byte, cachegen uint16) (node, error) {
136+
func decodeShort(hash, elems []byte, cachegen uint16) (node, error) {
137137
kbuf, rest, err := rlp.SplitString(elems)
138138
if err != nil {
139139
return nil, err
@@ -155,7 +155,7 @@ func decodeShort(hash, buf, elems []byte, cachegen uint16) (node, error) {
155155
return &shortNode{key, r, flag}, nil
156156
}
157157

158-
func decodeFull(hash, buf, elems []byte, cachegen uint16) (*fullNode, error) {
158+
func decodeFull(hash, elems []byte, cachegen uint16) (*fullNode, error) {
159159
n := &fullNode{flags: nodeFlag{hash: hash, gen: cachegen}}
160160
for i := 0; i < 16; i++ {
161161
cld, rest, err := decodeRef(elems, cachegen)

0 commit comments

Comments
 (0)