-
Notifications
You must be signed in to change notification settings - Fork 66
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
remove lastErr variables from rpc_test.go #185
Conversation
79b8000
to
1703823
Compare
lastErr was added to handle for something that likely shouldn't have been; it's an un-needed way to handle for errors. replace with simply failing the test if there are errors. fixes #182
Co-authored-by: Joshua Sing <[email protected]>
Co-authored-by: Joshua Sing <[email protected]>
53d265f
to
8f93b5e
Compare
service/tbc/rpc_test.go
Outdated
t.Fatal(err) | ||
} | ||
|
||
if err := tbcServer.UtxoIndexer(ctx, &hash); err != nil { | ||
if err = tbcServer.UtxoIndexer(ctx, &hash); err != nil { |
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.
When using this idiom you really should keep :=
.
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 yes will fix
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.
@joshuasing @marcopeereboom I am ok with either way; you two decide 👍
OOO - addressed feedback
* remove lastErr variables from rpc_test.go lastErr was added to handle for something that likely shouldn't have been; it's an un-needed way to handle for errors. replace with simply failing the test if there are errors. fixes hemilabs#182 * removed un-needed for loops * bump test timeout * re-added needed break * surround break in else for readability * tune timeout back to 1 minute * lint * Update service/tbc/rpc_test.go Co-authored-by: Joshua Sing <[email protected]> * Update service/tbc/rpc_test.go Co-authored-by: Joshua Sing <[email protected]> * cleanup from pr feedback * fixed error checking based on feedback * handle write errors differently in tests * get rid of some shadowing * more code cleanup * fixed test * trying larger wait * fix byte order * pr feedback --------- Co-authored-by: Joshua Sing <[email protected]>
Summary
lastErr was added to handle for something that likely shouldn't have been; it's an un-needed way to handle for errors. replace with simply failing the test if there are errors.
Changes
remove lastErr variables from rpc_test.go
fixes #182