-
Notifications
You must be signed in to change notification settings - Fork 198
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
chore(api): Dropped node api context generic #2456
Conversation
@@ -46,8 +47,8 @@ func (h *Handler[ContextT]) GetState(c ContextT) (any, error) { | |||
} | |||
return beacontypes.StateResponse{ | |||
// TODO: The version should be retrieved based on the slot | |||
Version: "deneb", // stubbed |
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.
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.
makes sense. latest
version might not be necessary since we want to provide the version at which the incoming request is queried for. Would probably just require returning chainSpec.ActiveForkVersionForSlot(requestedSlot).String()
Signed-off-by: aBear <[email protected]>
a957553
to
f91e75e
Compare
import "github.com/labstack/echo/v4" | ||
|
||
type ( | ||
Context = echo.Context |
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.
moved to handler package
) | ||
|
||
type Context = echo.Context |
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.
moved here from echo package to avoid import cycle
type VersionResponse struct { | ||
Data struct { | ||
Version string `json:"version"` | ||
} `json:"data"` | ||
} | ||
|
||
response := VersionResponse{} | ||
response.Data.Version = "1.0.0" | ||
response.Data.Version = "1.1.0" |
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.
updated here just to signal that we should fix this
228dd3d
to
7bedccc
Compare
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.
LGTM - Much needed
Signed-off-by: aBear <[email protected]>
Signed-off-by: aBear <[email protected]>
Cleaned up the NodeAPIs context.
Apologies to @fridrik01 for stealing this