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
e6af65d0
Commit
e6af65d0
authored
Feb 20, 2016
by
Ricardo Catalinas Jiménez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
common: Remove dead code
parent
fbf3b2ed
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
36 deletions
+0
-36
bytes.go
common/bytes.go
+0
-16
bytes_test.go
common/bytes_test.go
+0
-20
No files found.
common/bytes.go
View file @
e6af65d0
...
@@ -48,22 +48,6 @@ func FromHex(s string) []byte {
...
@@ -48,22 +48,6 @@ func FromHex(s string) []byte {
return
nil
return
nil
}
}
type
Bytes
[]
byte
func
(
self
Bytes
)
String
()
string
{
return
string
(
self
)
}
func
DeleteFromByteSlice
(
s
[][]
byte
,
hash
[]
byte
)
[][]
byte
{
for
i
,
h
:=
range
s
{
if
bytes
.
Compare
(
h
,
hash
)
==
0
{
return
append
(
s
[
:
i
:
i
],
s
[
i
+
1
:
]
...
)
}
}
return
s
}
// Number to bytes
// Number to bytes
//
//
// Returns the number in bytes with the specified base
// Returns the number in bytes with the specified base
...
...
common/bytes_test.go
View file @
e6af65d0
...
@@ -27,26 +27,6 @@ type BytesSuite struct{}
...
@@ -27,26 +27,6 @@ type BytesSuite struct{}
var
_
=
checker
.
Suite
(
&
BytesSuite
{})
var
_
=
checker
.
Suite
(
&
BytesSuite
{})
func
(
s
*
BytesSuite
)
TestByteString
(
c
*
checker
.
C
)
{
var
data
Bytes
data
=
[]
byte
{
102
,
111
,
111
}
exp
:=
"foo"
res
:=
data
.
String
()
c
.
Assert
(
res
,
checker
.
Equals
,
exp
)
}
/*
func (s *BytesSuite) TestDeleteFromByteSlice(c *checker.C) {
data := []byte{1, 2, 3, 4}
slice := []byte{1, 2, 3, 4}
exp := []byte{1, 4}
res := DeleteFromByteSlice(data, slice)
c.Assert(res, checker.DeepEquals, exp)
}
*/
func
(
s
*
BytesSuite
)
TestNumberToBytes
(
c
*
checker
.
C
)
{
func
(
s
*
BytesSuite
)
TestNumberToBytes
(
c
*
checker
.
C
)
{
// data1 := int(1)
// data1 := int(1)
// res1 := NumberToBytes(data1, 16)
// res1 := NumberToBytes(data1, 16)
...
...
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