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

multinode: remove generic result type #10

Merged
merged 1 commit into from
Feb 3, 2025
Merged

multinode: remove generic result type #10

merged 1 commit into from
Feb 3, 2025

Conversation

jmank88
Copy link
Collaborator

@jmank88 jmank88 commented Jan 20, 2025

While investigating SendTxReturnCode I noticed that this exported and generic result wrapper type is not really necessary.

Supports

@pavel-raykov
Copy link
Contributor

This looks fine, is there an associated PR for the main chainlink repo?

pavel-raykov
pavel-raykov previously approved these changes Jan 20, 2025
@jmank88 jmank88 marked this pull request as ready for review January 22, 2025 11:56
@jmank88 jmank88 requested a review from a team as a code owner January 22, 2025 11:57
@jmank88 jmank88 marked this pull request as draft January 22, 2025 12:14
pavel-raykov
pavel-raykov previously approved these changes Jan 22, 2025
type SendTxResult interface {
Code() SendTxReturnCode
Error() error
type sendTxResult[RESULT any] struct {
Copy link
Collaborator Author

@jmank88 jmank88 Jan 30, 2025

Choose a reason for hiding this comment

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

Instead of requiring this interface to be implemented by each user, we can use a struct internally, and multivalue returns with a plain generic result value. This sheds a ton of boilerplate, including the constructor function.

@jmank88 jmank88 marked this pull request as ready for review January 31, 2025 18:46
@jmank88 jmank88 merged commit 9395265 into main Feb 3, 2025
3 checks passed
@jmank88 jmank88 deleted the rm-generic-result branch February 3, 2025 18:30
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