Skip to content

Commit

Permalink
Merge pull request #18 from Chia-Network/crawler-cert-fallback
Browse files Browse the repository at this point in the history
Fall back to full node keypair if seeder section or keys are missing
  • Loading branch information
cmmarslender authored Jun 22, 2022
2 parents 4aac1db + 37df3bd commit a9036a7
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 a9036a7

Please sign in to comment.