8000 don't return certifier info if it is not configured by poszu · Pull Request #543 · spacemeshos/poet · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

don't return certifier info if it is not configured #543

New issue
8000

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 14, 2024

Conversation

poszu
Copy link
Contributor
@poszu poszu commented Nov 13, 2024

Fixes a regression introduced in #514. The /info wrongly responds with an empty certifier config instead of a null.

Getting:

{
  "certifier": {
    "url": "",
    "pubkey": ""
  }
}

Expected:

{
  "certifier": null
}

The problem stems from the fact that the go-flags initializes the Certifer pointer field of registration.Config regardless of whether any of the fields is set with a flag. Before the regression, the cfg.Certifier was manually set to nil if the certifier URL wasn't set. It's not cleared anymore because of the support for trusted keys (added in #514).

Copy link
codecov bot commented Nov 13, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 78.3%. Comparing base (f68ad30) to head (8c6d180).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
server/config.go 50.0% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           develop    #543   +/-   ##
=======================================
  Coverage     78.2%   78.3%           
=======================================
  Files           27      27           
  Lines         2264    2265    +1     
=======================================
+ Hits          1772    1775    +3     
+ Misses         361     358    -3     
- Partials       131     132    +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@poszu poszu force-pushed the fix/info-certifier-data branch from 695ad7e to ffd9b3e Compare November 14, 2024 09:03
@poszu poszu marked this pull request as ready for review November 14, 2024 09:11
@poszu poszu requested a review from fasmat November 14, 2024 09:13
@poszu poszu added this pull request to the merge queue Nov 14, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 14, 2024
@fasmat fasmat added this pull request to the merge queue Nov 14, 2024
Merged via the queue into develop with commit b80653b Nov 14, 2024
10 of 11 checks passed
@jellonek jellonek deleted the fix/info-certifier-data branch November 14, 2024 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0