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

bugfixes: small tidy ups and bug fixes #13

Merged
merged 3 commits into from
Jun 10, 2024
Merged

bugfixes: small tidy ups and bug fixes #13

merged 3 commits into from
Jun 10, 2024

Conversation

msf
Copy link
Contributor

@msf msf commented Jun 7, 2024

No description provided.

@msf msf requested review from vegarsti and helanto June 7, 2024 14:59
Copy link
Contributor

@helanto helanto left a comment

Choose a reason for hiding this comment

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

💪

if request.ContentEncoding != "" {
req.Header.Set("Content-Encoding", request.ContentEncoding)
}
req.Header.Set("Content-Type", "application/x-ndjson")
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it going to be always JSON ? Or JSON just for now ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

for now, but great question

Copy link
Member

@vegarsti vegarsti left a comment

Choose a reason for hiding this comment

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

Great!

@@ -37,6 +39,7 @@ func NewClient(log *slog.Logger, cfg Config) (*rpcClient, error) { // revive:dis
client.Logger = log
client.CheckRetry = retryablehttp.DefaultRetryPolicy
client.Backoff = retryablehttp.LinearJitterBackoff
client.HTTPClient.Timeout = DefaultRequestTimeout
Copy link
Member

Choose a reason for hiding this comment

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

Nice

}
i.log.Info(fmt.Sprintf("Waiting %v for block to be available..", i.cfg.PollInterval),
i.log.Debug(fmt.Sprintf("Waiting %v for block to be available..", i.cfg.PollInterval),
Copy link
Member

Choose a reason for hiding this comment

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

-> waited? 😄

Comment on lines +81 to +84
if errors.Is(err, context.Canceled) {
i.log.Info("Context canceled, stopping..")
return err
}
Copy link
Member

Choose a reason for hiding this comment

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

ah nice, this fixed the racy test perhaps?

@vegarsti vegarsti merged commit 3ff81f1 into main Jun 10, 2024
1 check passed
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.

3 participants