Skip to content
New issue

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

config/migrate: Automatically configure external P2P addresses for validators #5410

Merged
merged 1 commit into from
Oct 19, 2023

Conversation

ptrus
Copy link
Member

@ptrus ptrus commented Oct 19, 2023

No description provided.

@ptrus ptrus force-pushed the ptrus/fix/config-migrate-validator-p2p branch from 19cec16 to b336056 Compare October 19, 2023 15:20
@ptrus ptrus changed the title config/migrate: Automatically configure external P2P addresses config/migrate: Automatically configure external P2P addresses for validators Oct 19, 2023
@ptrus ptrus force-pushed the ptrus/fix/config-migrate-validator-p2p branch from b336056 to 1877c5b Compare October 19, 2023 15:31
@ptrus ptrus force-pushed the ptrus/fix/config-migrate-validator-p2p branch from 1877c5b to b041f6f Compare October 19, 2023 15:45
@ptrus ptrus force-pushed the ptrus/fix/config-migrate-validator-p2p branch from b041f6f to 1f4f23f Compare October 19, 2023 16:46
// Set P2P registration addresses if not set.
if _, ok := m(m(newCfg["p2p"])["registration"])["addresses"]; !ok {
mkSubMap(m(newCfg["p2p"]), "registration")
m(m(newCfg["p2p"])["registration"])["addresses"] = []string{url.Hostname() + ":9200"}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this use the value from p2p.port instead of 9200?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, also refactored a bit since now the "external_address" is only needed for the "registartion.addresses" part.

@ptrus ptrus force-pushed the ptrus/fix/config-migrate-validator-p2p branch from 1f4f23f to a15cc39 Compare October 19, 2023 16:53
@ptrus ptrus force-pushed the ptrus/fix/config-migrate-validator-p2p branch from a15cc39 to 5f852bb Compare October 19, 2023 16:55
@codecov
Copy link

codecov bot commented Oct 19, 2023

Codecov Report

Merging #5410 (5f852bb) into master (993d58e) will increase coverage by 0.43%.
Report is 1 commits behind head on master.
The diff coverage is 75.00%.

@@            Coverage Diff             @@
##           master    #5410      +/-   ##
==========================================
+ Coverage   66.43%   66.87%   +0.43%     
==========================================
  Files         533      533              
  Lines       56329    56348      +19     
==========================================
+ Hits        37424    37680     +256     
+ Misses      14499    14267     -232     
+ Partials     4406     4401       -5     
Files Coverage Δ
go/oasis-node/cmd/config/migrate/migrate.go 70.84% <75.00%> (+0.10%) ⬆️

... and 65 files with indirect coverage changes

@ptrus ptrus merged commit d4a2f09 into master Oct 19, 2023
3 checks passed
@ptrus ptrus deleted the ptrus/fix/config-migrate-validator-p2p branch October 19, 2023 17:43
ptrus added a commit that referenced this pull request Oct 20, 2023
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