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
9d152d61
Commit
9d152d61
authored
Apr 22, 2015
by
Felix Lange
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
common: delete BinaryLength
The test is failing the 32bit build and the function is not used anywhere.
parent
2f4cc721
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
25 deletions
+0
-25
bytes.go
common/bytes.go
+0
-11
bytes_test.go
common/bytes_test.go
+0
-14
No files found.
common/bytes.go
View file @
9d152d61
...
@@ -106,17 +106,6 @@ func ReadVarInt(buff []byte) (ret uint64) {
...
@@ -106,17 +106,6 @@ func ReadVarInt(buff []byte) (ret uint64) {
return
return
}
}
// Binary length
//
// Returns the true binary length of the given number
func
BinaryLength
(
num
int
)
int
{
if
num
==
0
{
return
0
}
return
1
+
BinaryLength
(
num
>>
8
)
}
// Copy bytes
// Copy bytes
//
//
// Returns an exact copy of the provided bytes
// Returns an exact copy of the provided bytes
...
...
common/bytes_test.go
View file @
9d152d61
...
@@ -79,20 +79,6 @@ func (s *BytesSuite) TestReadVarInt(c *checker.C) {
...
@@ -79,20 +79,6 @@ func (s *BytesSuite) TestReadVarInt(c *checker.C) {
c
.
Assert
(
res1
,
checker
.
Equals
,
exp1
)
c
.
Assert
(
res1
,
checker
.
Equals
,
exp1
)
}
}
func
(
s
*
BytesSuite
)
TestBinaryLength
(
c
*
checker
.
C
)
{
data1
:=
0
data2
:=
920987656789
exp1
:=
0
exp2
:=
5
res1
:=
BinaryLength
(
data1
)
res2
:=
BinaryLength
(
data2
)
c
.
Assert
(
res1
,
checker
.
Equals
,
exp1
)
c
.
Assert
(
res2
,
checker
.
Equals
,
exp2
)
}
func
(
s
*
BytesSuite
)
TestCopyBytes
(
c
*
checker
.
C
)
{
func
(
s
*
BytesSuite
)
TestCopyBytes
(
c
*
checker
.
C
)
{
data1
:=
[]
byte
{
1
,
2
,
3
,
4
}
data1
:=
[]
byte
{
1
,
2
,
3
,
4
}
exp1
:=
[]
byte
{
1
,
2
,
3
,
4
}
exp1
:=
[]
byte
{
1
,
2
,
3
,
4
}
...
...
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