Skip to content

Commit 6c142f4

Browse files
fix: getPeers size check (#2417)
<!-- Please read and fill out this form before submitting your PR. Please make sure you have reviewed our contributors guide before submitting your first PR. NOTE: PR titles should follow semantic commits: https://www.conventionalcommits.org/en/v1.0.0/ --> ## Overview Duplicate of #2408, was reverted in #2394 <!-- Please provide an explanation of the PR, including the appropriate context, background, goal, and rationale. If there is an issue with this information, please provide a tl;dr and link the issue. Ex: Closes #<issue number> --> Co-authored-by: pthmas <9058370+pthmas@users.noreply.github.com>
1 parent a89ee79 commit 6c142f4

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

pkg/sync/sync_service.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,10 +382,11 @@ func (syncService *SyncService[H]) getPeerIDs() []peer.ID {
382382

383383
func getPeers(seeds string, logger log.Logger) []peer.ID {
384384
var peerIDs []peer.ID
385-
sl := strings.Split(seeds, ",")
386-
if len(sl) == 0 {
385+
if seeds == "" {
387386
return peerIDs
388387
}
388+
sl := strings.Split(seeds, ",")
389+
389390
for _, seed := range sl {
390391
maddr, err := multiaddr.NewMultiaddr(seed)
391392
if err != nil {

0 commit comments

Comments
 (0)