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

test(pop-api): read_state chain extension test #22

Merged
merged 1 commit into from
Mar 7, 2024

Conversation

evilrobot-01
Copy link
Collaborator

@evilrobot-01 evilrobot-01 commented Mar 6, 2024

Adds test to ensure that read_state chain extension works.

Notes:

  • added MaxEncodedLen to key types to use env.read_as()
  • charges a db read for reading the specified key from contract memory, to be replaced once benchmarked
  • charges a db read for obtaining the last relay block
  • removed unnecessary pub modifiers

Copy link
Collaborator

@Daanvdplas Daanvdplas left a comment

Choose a reason for hiding this comment

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

Well done! Left two comments

runtime/src/extensions.rs Show resolved Hide resolved
runtime/src/extensions.rs Show resolved Hide resolved
@evilrobot-01 evilrobot-01 merged commit 731382f into main Mar 7, 2024
5 checks passed
@evilrobot-01 evilrobot-01 deleted the frank/test-read-state branch March 7, 2024 08:17
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