-
Notifications
You must be signed in to change notification settings - Fork 11
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
BEDS 1140/vali group #1300
base: staging
Are you sure you want to change the base?
BEDS 1140/vali group #1300
Conversation
LuccaBitfly
commented
Jan 28, 2025
•
edited
Loading
edited
- if a validator was part of a dashboard and that dashboard had reached its limit, the validators group couldn't be changed when providing an index list
- fixed by this PR
91feb1e
to
418fa56
Compare
@@ -241,10 +241,10 @@ func ConstantTimeDelay(start time.Time, intendedMinWait time.Duration) { | |||
} | |||
} | |||
|
|||
func SliceToMap[T comparable](s []T) map[T]bool { | |||
m := make(map[T]bool) | |||
func SliceToMap[T comparable](s []T) map[T]struct{} { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LuccaBitfly Please, write a unit test for this function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@remoterami @LuccaBitfly
utils is the best file for us to start covering with the unit tests
especially I've seen places in a code where / 0 is possible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -827,6 +827,21 @@ func (d *DataAccessService) AddValidatorDashboardValidators(ctx context.Context, | |||
return result, nil | |||
} | |||
|
|||
func (d *DataAccessService) GetValidatorDashboardValidatorsOfList(ctx context.Context, dashboardId t.VDBIdPrimary, validators []t.VDBValidator) ([]t.VDBValidator, error) { | |||
var result []uint64 | |||
q := `SELECT DISTINCT uvdv.validator_index |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we wrap sql query in goqu?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Added minor comments, otherwise LGFM 👍 |
6a80f3c
to
685b2c9
Compare
- if a validator was part of a dashboard and that dashboard had reached its limit, the validators group couldn't be changed when providing an index list - fixed by this commit See: BEDS-1140
See: BEDS-1140
685b2c9
to
72fa0d3
Compare