Skip to content

Commit

Permalink
Remove prefix check
Browse files Browse the repository at this point in the history
  • Loading branch information
AnkushinDaniil committed Jan 3, 2025
1 parent 1f1be62 commit 478e8cd
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions p2p/p2p.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package p2p

import (
"bytes"
"context"
"encoding/hex"
"errors"
Expand Down Expand Up @@ -420,9 +419,6 @@ func loadPeers(database db.DB) ([]peer.AddrInfo, error) {
var peerIDBytes []byte
for it.Seek(prefix); it.Valid(); it.Next() {
peerIDBytes = it.Key()
if !bytes.HasPrefix(peerIDBytes, prefix) {
break
}
peerID, err := peer.IDFromBytes(peerIDBytes[len(prefix):])
if err != nil {
return fmt.Errorf("decode peer ID: %w", err)
Expand Down

0 comments on commit 478e8cd

Please sign in to comment.