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
687e4dc8
Unverified
Commit
687e4dc8
authored
Feb 24, 2022
by
ucwong
Committed by
GitHub
Feb 24, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rlp: add WriteString method on EncoderBuffer (#24425)
rlpgen outputs calls to this method for values of type string.
parent
0cb4d65f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
encbuffer.go
rlp/encbuffer.go
+9
-0
No files found.
rlp/encbuffer.go
View file @
687e4dc8
...
...
@@ -118,6 +118,10 @@ func (buf *encBuffer) writeBytes(b []byte) {
}
}
func
(
buf
*
encBuffer
)
writeString
(
s
string
)
{
buf
.
writeBytes
([]
byte
(
s
))
}
// wordBytes is the number of bytes in a big.Word
const
wordBytes
=
(
32
<<
(
uint64
(
^
big
.
Word
(
0
))
>>
63
))
/
8
...
...
@@ -340,6 +344,11 @@ func (w EncoderBuffer) WriteBytes(b []byte) {
w
.
buf
.
writeBytes
(
b
)
}
// WriteBytes encodes s as an RLP string.
func
(
w
EncoderBuffer
)
WriteString
(
s
string
)
{
w
.
buf
.
writeString
(
s
)
}
// List starts a list. It returns an internal index. Call EndList with
// this index after encoding the content to finish the list.
func
(
w
EncoderBuffer
)
List
()
int
{
...
...
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