Skip to content

Commit

Permalink
Fall back to full node keypair if seeder section or keys are missing …
Browse files Browse the repository at this point in the history
…from the config
  • Loading branch information
cmmarslender committed Jun 22, 2022
1 parent 4aac1db commit 37df3bd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/httpclient/httpclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,12 @@ func (c *HTTPClient) initialKeyPairs() error {

c.crawlerKeyPair, err = c.config.Seeder.CrawlerConfig.SSL.LoadPrivateKeyPair()
if err != nil {
return fmt.Errorf("error loading crawler config: %w", err)
// Fall back to just using the full node certs in this case
// This should only happen on old installations that didn't have the crawler in the config initially
c.crawlerKeyPair, err = c.config.FullNode.SSL.LoadPrivateKeyPair()
if err != nil {
return fmt.Errorf("error loading crawler config: %w", err)
}
}

return nil
Expand Down

0 comments on commit 37df3bd

Please sign in to comment.