Skip to content

Commit

Permalink
fix: meaningful error on lack of seed
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel authored and hacdias committed Apr 22, 2024
1 parent 99eeeaf commit f6bd4ce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- [`RAINBOW_GC_THRESHOLD`](#rainbow_gc_threshold)
- [`RAINBOW_IPNS_MAX_CACHE_TTL`](#rainbow_ipns_max_cache_ttl)
- [`RAINBOW_PEERING`](#rainbow_peering)
- [`RAINBOW_PEERING_SHARED_CACHE`](#rainbow_peering_shared_cache)
- [Logging](#logging)
- [`GOLOG_LOG_LEVEL`](#golog_log_level)
- [`GOLOG_LOG_FMT`](#golog_log_fmt)
Expand Down
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,8 @@ share the same seed as long as the indexes are different.
if err != nil {
return err

Check warning on line 309 in main.go

View check run for this annotation

Codecov / codecov/patch

main.go#L306-L309

Added lines #L306 - L309 were not covered by tests
}
} else if rainbowSeedRegex.MatchString(maStr) {
return fmt.Errorf("unable to peer with %q without defining --seed-index of this instance first", maStr)

Check warning on line 312 in main.go

View check run for this annotation

Codecov / codecov/patch

main.go#L311-L312

Added lines #L311 - L312 were not covered by tests
}

ai, err := peer.AddrInfoFromString(maStr)
Expand Down

0 comments on commit f6bd4ce

Please sign in to comment.