|
|
@ -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
|
|
|
|
// wordBytes is the number of bytes in a big.Word
|
|
|
|
const wordBytes = (32 << (uint64(^big.Word(0)) >> 63)) / 8 |
|
|
|
const wordBytes = (32 << (uint64(^big.Word(0)) >> 63)) / 8 |
|
|
|
|
|
|
|
|
|
|
@ -340,6 +344,11 @@ func (w EncoderBuffer) WriteBytes(b []byte) { |
|
|
|
w.buf.writeBytes(b) |
|
|
|
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
|
|
|
|
// List starts a list. It returns an internal index. Call EndList with
|
|
|
|
// this index after encoding the content to finish the list.
|
|
|
|
// this index after encoding the content to finish the list.
|
|
|
|
func (w EncoderBuffer) List() int { |
|
|
|
func (w EncoderBuffer) List() int { |
|
|
|