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

Added heavy miss meter #149

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Conversation

philip-morlier
Copy link
Collaborator

No description provided.

heavy/heavy.go Outdated
@@ -96,5 +106,8 @@ func callHeavy[T any](ctx context.Context, backendURL string, cutoffBlock *uint6
log.Error("callHeavy response unmarshalling error", "err", err)
return nil, rpc.NewRPCError(-32500, genericError)
}
if IsZero[T](ret) {
Copy link
Contributor

Choose a reason for hiding this comment

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

So, I just recently learned that you don't have to specify [T] if it can be inferred from an argument. That doesn't work for return values (unless they match an input value), but it typically would work for function parameters. That is to say, this could just be:

IsZero(ret)

And it would work just fine.

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.

2 participants