aboutsummaryrefslogtreecommitdiffstats
path: root/rlp
diff options
context:
space:
mode:
authorS. Matthew English <s-matthew-english@users.noreply.github.com>2017-06-12 20:45:17 +0800
committerFelix Lange <fjl@users.noreply.github.com>2017-06-12 20:45:17 +0800
commit061889d4ea13b23d777efbe005210ead8667e869 (patch)
tree35a391e5ac09e683796c3c698f36542f06803d03 /rlp
parente3dfd5582026a8744a80d3de407601526b720abb (diff)
downloaddexon-061889d4ea13b23d777efbe005210ead8667e869.tar
dexon-061889d4ea13b23d777efbe005210ead8667e869.tar.gz
dexon-061889d4ea13b23d777efbe005210ead8667e869.tar.bz2
dexon-061889d4ea13b23d777efbe005210ead8667e869.tar.lz
dexon-061889d4ea13b23d777efbe005210ead8667e869.tar.xz
dexon-061889d4ea13b23d777efbe005210ead8667e869.tar.zst
dexon-061889d4ea13b23d777efbe005210ead8667e869.zip
rlp, trie, contracts, compression, consensus: improve comments (#14580)
Diffstat (limited to 'rlp')
-rw-r--r--rlp/decode.go6
-rw-r--r--rlp/doc.go4
-rw-r--r--rlp/encode.go4
-rw-r--r--rlp/raw.go2
4 files changed, 8 insertions, 8 deletions
diff --git a/rlp/decode.go b/rlp/decode.go
index ee0b7dbcd..78ccf6275 100644
--- a/rlp/decode.go
+++ b/rlp/decode.go
@@ -55,7 +55,7 @@ type Decoder interface {
// To decode into a pointer, Decode will decode into the value pointed
// to. If the pointer is nil, a new value of the pointer's element
// type is allocated. If the pointer is non-nil, the existing value
-// will reused.
+// will be reused.
//
// To decode into a struct, Decode expects the input to be an RLP
// list. The decoded elements of the list are assigned to each public
@@ -290,7 +290,7 @@ func makeListDecoder(typ reflect.Type, tag tags) (decoder, error) {
}
case tag.tail:
// A slice with "tail" tag can occur as the last field
- // of a struct and is upposed to swallow all remaining
+ // of a struct and is supposed to swallow all remaining
// list elements. The struct decoder already called s.List,
// proceed directly to decoding the elements.
dec = func(s *Stream, val reflect.Value) error {
@@ -741,7 +741,7 @@ func (s *Stream) uint(maxbits int) (uint64, error) {
}
// Bool reads an RLP string of up to 1 byte and returns its contents
-// as an boolean. If the input does not contain an RLP string, the
+// as a boolean. If the input does not contain an RLP string, the
// returned error will be ErrExpectedString.
func (s *Stream) Bool() (bool, error) {
num, err := s.uint(8)
diff --git a/rlp/doc.go b/rlp/doc.go
index 72667416c..b3a81fe23 100644
--- a/rlp/doc.go
+++ b/rlp/doc.go
@@ -17,13 +17,13 @@
/*
Package rlp implements the RLP serialization format.
-The purpose of RLP (Recursive Linear Prefix) qis to encode arbitrarily
+The purpose of RLP (Recursive Linear Prefix) is to encode arbitrarily
nested arrays of binary data, and RLP is the main encoding method used
to serialize objects in Ethereum. The only purpose of RLP is to encode
structure; encoding specific atomic data types (eg. strings, ints,
floats) is left up to higher-order protocols; in Ethereum integers
must be represented in big endian binary form with no leading zeroes
-(thus making the integer value zero be equivalent to the empty byte
+(thus making the integer value zero equivalent to the empty byte
array).
RLP values are distinguished by a type tag. The type tag precedes the
diff --git a/rlp/encode.go b/rlp/encode.go
index c20897efe..44592c2f5 100644
--- a/rlp/encode.go
+++ b/rlp/encode.go
@@ -478,7 +478,7 @@ func writeEncoder(val reflect.Value, w *encbuf) error {
// with a pointer receiver.
func writeEncoderNoPtr(val reflect.Value, w *encbuf) error {
if !val.CanAddr() {
- // We can't get the address. It would be possible make the
+ // We can't get the address. It would be possible to make the
// value addressable by creating a shallow copy, but this
// creates other problems so we're not doing it (yet).
//
@@ -583,7 +583,7 @@ func makePtrWriter(typ reflect.Type) (writer, error) {
return writer, err
}
-// putint writes i to the beginning of b in with big endian byte
+// putint writes i to the beginning of b in big endian byte
// order, using the least number of bytes needed to represent i.
func putint(b []byte, i uint64) (size int) {
switch {
diff --git a/rlp/raw.go b/rlp/raw.go
index 33aae6ee5..6bf1c1df8 100644
--- a/rlp/raw.go
+++ b/rlp/raw.go
@@ -22,7 +22,7 @@ import (
)
// RawValue represents an encoded RLP value and can be used to delay
-// RLP decoding or precompute an encoding. Note that the decoder does
+// RLP decoding or to precompute an encoding. Note that the decoder does
// not verify whether the content of RawValues is valid RLP.
type RawValue []byte