diff --git a/key/key.go b/key/key.go index 8f45f3e..070a26e 100644 --- a/key/key.go +++ b/key/key.go @@ -5,7 +5,6 @@ import ( "encoding/json" "fmt" "math/big" - "math/bits" "strings" kbucket "github.com/libp2p/go-libp2p-kbucket" @@ -28,15 +27,6 @@ func BytesKey(b []byte) Key { // First bit (in each byte) is least significant. 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 { if k[offset/8]&(byte(1)<<(7-offset%8)) == 0 { return 0 diff --git a/trie/check.go b/trie/check.go index 1627746..04c5482 100644 --- a/trie/check.go +++ b/trie/check.go @@ -67,7 +67,6 @@ func (trie *Trie) checkInvariant(depth int, pathSoFar *triePath) *InvariantDiscr } } } - panic("unreachable") } type triePath struct {