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

Migration from the drand v1.5 codebase to its own repo #2

Merged
merged 28 commits into from
Jul 24, 2024
Merged

Conversation

AnomalRoil
Copy link
Member

Now with tests passing and relay seemingly working locally.

Copy link
Contributor

@CluEleSsUK CluEleSsUK left a comment

Choose a reason for hiding this comment

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

first round of comments - have already lost the will to live

client/aggregator.go Outdated Show resolved Hide resolved
client/aggregator.go Show resolved Hide resolved
client/cache.go Show resolved Hide resolved

// Wrap provides a single entrypoint for wrapping a concrete client
// implementation with configured aggregation, caching, and retry logic
func Wrap(ctx context.Context, l log.Logger, clients []client.Client, options ...Option) (client.Client, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

imo it's worth adding another convenience constructor that takes []string addresses and just builds a verifying, speedtesting HTTP client for noobs to use

client/verify.go Outdated Show resolved Hide resolved
client/mock/mock.go Show resolved Hide resolved
client/optimizing.go Show resolved Hide resolved
client/optimizing.go Show resolved Hide resolved
if rr.err != nil {
oc.log.Infow("", "optimizing_client", "endpoint down when speed tested", "client", fmt.Sprintf("%s", rr.client), "err", rr.err)
}
stats = append(stats, rr.stat)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think rr could be nil in some scenarios here, particularly on a context closing downstream

client/optimizing.go Show resolved Hide resolved
@AnomalRoil AnomalRoil merged commit 59b065a into main Jul 24, 2024
2 checks passed
@AnomalRoil AnomalRoil deleted the new/wip branch July 24, 2024 14:44
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