Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
cfe8f5fd
Commit
cfe8f5fd
authored
Apr 27, 2018
by
xincaosu
Committed by
Péter Szilágyi
Apr 27, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trie: remove unused `buf` parameter (#16583)
parent
852aa143
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
node.go
trie/node.go
+4
-4
No files found.
trie/node.go
View file @
cfe8f5fd
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment