aboutsummaryrefslogtreecommitdiffstats
path: root/trie
diff options
context:
space:
mode:
authorxincaosu <xincaosu@126.com>2018-04-27 17:45:02 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-04-27 17:45:02 +0800
commitcfe8f5fd948954ccedd975b6630e455a4e5653db (patch)
tree20c671e629b3b3a4a5da91f9119a7b4d0b28c5ab /trie
parent852aa143ac42907f6f9ed427a2ee1f85ffe7f524 (diff)
downloaddexon-cfe8f5fd948954ccedd975b6630e455a4e5653db.tar
dexon-cfe8f5fd948954ccedd975b6630e455a4e5653db.tar.gz
dexon-cfe8f5fd948954ccedd975b6630e455a4e5653db.tar.bz2
dexon-cfe8f5fd948954ccedd975b6630e455a4e5653db.tar.lz
dexon-cfe8f5fd948954ccedd975b6630e455a4e5653db.tar.xz
dexon-cfe8f5fd948954ccedd975b6630e455a4e5653db.tar.zst
dexon-cfe8f5fd948954ccedd975b6630e455a4e5653db.zip
trie: remove unused `buf` parameter (#16583)
Diffstat (limited to 'trie')
-rw-r--r--trie/node.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/trie/node.go b/trie/node.go
index a7697fc0c..02815042c 100644
--- a/trie/node.go
+++ b/trie/node.go
@@ -123,17 +123,17 @@ func decodeNode(hash, buf []byte, cachegen uint16) (node, error) {
}
switch c, _ := rlp.CountValues(elems); c {
case 2:
- n, err := decodeShort(hash, buf, elems, cachegen)
+ n, err := decodeShort(hash, elems, cachegen)
return n, wrapError(err, "short")
case 17:
- n, err := decodeFull(hash, buf, elems, cachegen)
+ n, err := decodeFull(hash, elems, cachegen)
return n, wrapError(err, "full")
default:
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)
if err != nil {
return nil, err
@@ -155,7 +155,7 @@ func decodeShort(hash, buf, elems []byte, cachegen uint16) (node, error) {
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}}
for i := 0; i < 16; i++ {
cld, rest, err := decodeRef(elems, cachegen)