aboutsummaryrefslogtreecommitdiffstats
path: root/ethutil/bytes.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-07-30 05:33:33 +0800
committerobscuren <geffobscura@gmail.com>2014-07-30 05:33:33 +0800
commit5ca29381175d553bb764040e8cd892a4ba370645 (patch)
tree17d4526e3de1364be020af984f46bc7415f66412 /ethutil/bytes.go
parent6fd2401cdf792996c0183f896412831dd335377a (diff)
downloadgo-tangerine-5ca29381175d553bb764040e8cd892a4ba370645.tar
go-tangerine-5ca29381175d553bb764040e8cd892a4ba370645.tar.gz
go-tangerine-5ca29381175d553bb764040e8cd892a4ba370645.tar.bz2
go-tangerine-5ca29381175d553bb764040e8cd892a4ba370645.tar.lz
go-tangerine-5ca29381175d553bb764040e8cd892a4ba370645.tar.xz
go-tangerine-5ca29381175d553bb764040e8cd892a4ba370645.tar.zst
go-tangerine-5ca29381175d553bb764040e8cd892a4ba370645.zip
Fixed
Diffstat (limited to 'ethutil/bytes.go')
-rw-r--r--ethutil/bytes.go22
1 files changed, 0 insertions, 22 deletions
diff --git a/ethutil/bytes.go b/ethutil/bytes.go
index eca2cc366..4027e3986 100644
--- a/ethutil/bytes.go
+++ b/ethutil/bytes.go
@@ -44,28 +44,6 @@ func BytesToNumber(b []byte) uint64 {
// Read variable int
//
// Read a variable length number in big endian byte order
-func ReadVarint(reader *bytes.Reader) (ret uint64) {
- if reader.Len() > 4 {
- var num uint64
- binary.Read(reader, binary.BigEndian, &num)
- ret = uint64(num)
- } else if reader.Len() > 2 {
- var num uint32
- binary.Read(reader, binary.BigEndian, &num)
- ret = uint64(num)
- } else if reader.Len() > 0 {
- var num uint16
- binary.Read(reader, binary.BigEndian, &num)
- ret = uint64(num)
- } else {
- var num uint8
- binary.Read(reader, binary.BigEndian, &num)
- ret = uint64(num)
- }
-
- return ret
-}
-
func ReadVarInt(buff []byte) (ret uint64) {
switch l := len(buff); {
case l > 4: