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

Add HeightParam abstraction #172

Open
5 tasks
ljoss17 opened this issue Feb 15, 2024 · 1 comment
Open
5 tasks

Add HeightParam abstraction #172

ljoss17 opened this issue Feb 15, 2024 · 1 comment

Comments

@ljoss17
Copy link
Contributor

ljoss17 commented Feb 15, 2024

Summary

Some queries use a Option<Height> in order to define if the query must be done using the latest height or a specific height. Following this discussion, #167 (comment), a HeightParam abstraction could be used to specify the strategy used regarding the query height.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate milestone (priority) applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@romac
Copy link
Member

romac commented Feb 15, 2024

Why not just define a enum?

#[derive(Default)]
enum QueryHeight<Height> {
  #[default]
  Latest,
  Specific(Height),
}

In general I would push for not abstracting things away that we have no need to abstract over for now.

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

No branches or pull requests

2 participants