Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-p2p-xor
Commits
c2756e54
Unverified
Commit
c2756e54
authored
May 19, 2021
by
Marten Seemann
Committed by
GitHub
May 19, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #11 from libp2p/fix-linters
fix go vet and staticcheck
parents
71e28414
3d74fe16
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
11 deletions
+0
-11
key/key.go
key/key.go
+0
-10
trie/check.go
trie/check.go
+0
-1
No files found.
key/key.go
View file @
c2756e54
...
@@ -5,7 +5,6 @@ import (
...
@@ -5,7 +5,6 @@ import (
"encoding/json"
"encoding/json"
"fmt"
"fmt"
"math/big"
"math/big"
"math/bits"
"strings"
"strings"
kbucket
"github.com/libp2p/go-libp2p-kbucket"
kbucket
"github.com/libp2p/go-libp2p-kbucket"
...
@@ -28,15 +27,6 @@ func BytesKey(b []byte) Key {
...
@@ -28,15 +27,6 @@ func BytesKey(b []byte) Key {
// First bit (in each byte) is least significant.
// First bit (in each byte) is least significant.
type
Key
[]
byte
type
Key
[]
byte
// reverseBytesBits reverses the bit-endianness of each byte in a slice.
func
reverseBytesBits
(
blob
[]
byte
)
[]
byte
{
r
:=
make
([]
byte
,
len
(
blob
))
for
i
:=
range
blob
{
r
[
i
]
=
bits
.
Reverse8
(
blob
[
i
])
}
return
r
}
func
(
k
Key
)
BitAt
(
offset
int
)
byte
{
func
(
k
Key
)
BitAt
(
offset
int
)
byte
{
if
k
[
offset
/
8
]
&
(
byte
(
1
)
<<
(
7
-
offset
%
8
))
==
0
{
if
k
[
offset
/
8
]
&
(
byte
(
1
)
<<
(
7
-
offset
%
8
))
==
0
{
return
0
return
0
...
...
trie/check.go
View file @
c2756e54
...
@@ -67,7 +67,6 @@ func (trie *Trie) checkInvariant(depth int, pathSoFar *triePath) *InvariantDiscr
...
@@ -67,7 +67,6 @@ func (trie *Trie) checkInvariant(depth int, pathSoFar *triePath) *InvariantDiscr
}
}
}
}
}
}
panic
(
"unreachable"
)
}
}
type
triePath
struct
{
type
triePath
struct
{
...
...
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