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
c375936e
Unverified
Commit
c375936e
authored
Jun 16, 2023
by
John Chase
Committed by
GitHub
Jun 16, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rlp: fix typos (#27484)
fix typos Co-authored-by:
john
<
yejiarui@123.com
>
parent
604da5c8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
encode.go
rlp/encode.go
+1
-1
encode_test.go
rlp/encode_test.go
+1
-1
No files found.
rlp/encode.go
View file @
c375936e
...
...
@@ -419,7 +419,7 @@ func makeEncoderWriter(typ reflect.Type) writer {
// package json simply doesn't call MarshalJSON for this case, but encodes the
// value as if it didn't implement the interface. We don't want to handle it that
// way.
return
fmt
.
Errorf
(
"rlp: unadressable value of type %v, EncodeRLP is pointer method"
,
val
.
Type
())
return
fmt
.
Errorf
(
"rlp: unad
d
ressable value of type %v, EncodeRLP is pointer method"
,
val
.
Type
())
}
return
val
.
Addr
()
.
Interface
()
.
(
Encoder
)
.
EncodeRLP
(
w
)
}
...
...
rlp/encode_test.go
View file @
c375936e
...
...
@@ -396,7 +396,7 @@ var encTests = []encTest{
{
val
:
&
struct
{
TE
testEncoder
}{
testEncoder
{
errors
.
New
(
"test error"
)}},
error
:
"test error"
},
// Verify the error for non-addressable non-pointer Encoder.
{
val
:
testEncoder
{},
error
:
"rlp: unadressable value of type rlp.testEncoder, EncodeRLP is pointer method"
},
{
val
:
testEncoder
{},
error
:
"rlp: unad
d
ressable value of type rlp.testEncoder, EncodeRLP is pointer method"
},
// Verify Encoder takes precedence over []byte.
{
val
:
[]
byteEncoder
{
0
,
1
,
2
,
3
,
4
},
output
:
"C5C0C0C0C0C0"
},
...
...
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