Skip to content

improve linkedlist.Remove#1218

Closed
libotony wants to merge 1 commit into
release/hayabusafrom
tony/linkedlist
Closed

improve linkedlist.Remove#1218
libotony wants to merge 1 commit into
release/hayabusafrom
tony/linkedlist

Conversation

@libotony

@libotony libotony commented Aug 1, 2025

Copy link
Copy Markdown
Member

Description

Validation is passed in, no need to verify.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • New and existing E2E tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have not added any vulnerable dependencies to my code

@libotony
libotony requested a review from a team as a code owner August 1, 2025 09:09
next := validation.Next

// verify the entry exists in the linked list
validatorEntry, err := l.repo.GetValidation(validator)

@darrenkel darrenkel Aug 1, 2025

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.

Not sure if this code covers it, but there is a scenario where a Validation with nil prev and next values gets passed into eg, leadergroup or queued. This would essentially delete the whole linked list since we set head and tail values to nil

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Removed code is just to ensure the validation exists. Your question is covered in Line 76

@libotony libotony closed this Aug 1, 2025
@libotony
libotony deleted the tony/linkedlist branch September 4, 2025 09:07
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