Skip to content

Add deduplication function for host entries#281

Open
dviejokfs wants to merge 1 commit intohyperledger-bevel:mainfrom
dviejokfs:feat/deduplicate-hosts-enroll
Open

Add deduplication function for host entries#281
dviejokfs wants to merge 1 commit intohyperledger-bevel:mainfrom
dviejokfs:feat/deduplicate-hosts-enroll

Conversation

@dviejokfs
Copy link
Copy Markdown
Contributor

  • Introduced a new deduplicateHosts function in both ordnode_controller.go and peer_controller.go to eliminate duplicate host entries from enrollment requests.
  • Updated relevant functions to utilize this new deduplication logic, ensuring cleaner and more efficient host management during certificate enrollment and renewal processes.

These changes enhance the reliability of host handling in the application, preventing potential issues caused by duplicate entries.

…ollers

- Introduced a new `deduplicateHosts` function in both `ordnode_controller.go` and `peer_controller.go` to eliminate duplicate host entries from enrollment requests.
- Updated relevant functions to utilize this new deduplication logic, ensuring cleaner and more efficient host management during certificate enrollment and renewal processes.

These changes enhance the reliability of host handling in the application, preventing potential issues caused by duplicate entries.

Signed-off-by: dviejokfs <dviejo@kfs.es>
}, nil
}

func deduplicateHosts(hosts []string) []string {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[nitpick]: looks good, this function can be moved to utils to avoid duplication

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