Closed sergerad closed 1 year ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
ethgo | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jun 21, 2023 9:04pm |
@ferranbt could you please take a look at this PR. My biggest concern is the unhandled error
bump @ferranbt @vcastellm
Please check the CI.
The test that seems to be failing here, TestFilterIntegration
does not fail for me locally.
pauloleary@Pauls-MacBook-Pro-3 ethgo % go test -v -run TestFilterIntegration ./tracker
=== RUN TestFilterIntegration
--- PASS: TestFilterIntegration (3.97s)
PASS
ok github.com/umbracle/ethgo/tracker 4.159s
Not sure what the CI problem could be?
@paulgoleary thanks for taking a look. Sorry I have been out sick all week. Hoping to be back online tomorrow to look at this 🙏
re-bump @ferranbt @vcastellm
Changes
Why?
Pkg API funcs should return errors they encounter, rather than log them. This allows the caller to decide what to do on error and means we don't leak logging impl/semantics into ethgo (e.g. [ERROR] prefix).
See https://github.com/golang/go/wiki/CodeReviewComments#synchronous-functions
Usage goes from
to
Alternative Impl?
Could keep the funcs asynchronous and update them to return a channel of errors. More complicated, more side effects