-
Notifications
You must be signed in to change notification settings - Fork 1
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
Conversation
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.
💪
if request.ContentEncoding != "" { | ||
req.Header.Set("Content-Encoding", request.ContentEncoding) | ||
} | ||
req.Header.Set("Content-Type", "application/x-ndjson") |
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.
Is it going to be always JSON ? Or JSON just for now ?
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.
for now, but great question
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.
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 |
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.
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), |
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.
-> waited? 😄
if errors.Is(err, context.Canceled) { | ||
i.log.Info("Context canceled, stopping..") | ||
return err | ||
} |
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.
ah nice, this fixed the racy test perhaps?
No description provided.