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

Fix env::block_timestamp example #937

Merged
merged 3 commits into from
Sep 23, 2021
Merged

Conversation

cmichi
Copy link
Collaborator

@cmichi cmichi commented Sep 23, 2021

I noticed that the example contains a mistake. The comment says

/// The function can be executed at most once every 100 blocks.

But the env function used there is actually block_timestamp().

I first thought about just modifying the comment to

/// The function can be executed at most once every 100 milliseconds.

But since we don't know if the environment Timestamp actually counts in milliseconds we can't do that.

@cmichi cmichi requested a review from Robbepop September 23, 2021 06:16
@codecov-commenter
Copy link

codecov-commenter commented Sep 23, 2021

Codecov Report

Merging #937 (21426e8) into master (882b4dd) will decrease coverage by 0.07%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #937      +/-   ##
==========================================
- Coverage   82.84%   82.76%   -0.08%     
==========================================
  Files         177      177              
  Lines        8066     8066              
==========================================
- Hits         6682     6676       -6     
- Misses       1384     1390       +6     
Impacted Files Coverage Δ
crates/lang/src/env_access.rs 27.27% <ø> (ø)
...ates/storage/src/collections/hashmap/fuzz_tests.rs 93.61% <0.00%> (-6.39%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 882b4dd...21426e8. Read the comment docs.

Copy link
Collaborator

@Robbepop Robbepop left a comment

Choose a reason for hiding this comment

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

LGTM

@cmichi cmichi merged commit 0c7e9a3 into master Sep 23, 2021
@cmichi cmichi deleted the cmichi-fix-block_timestamp-example branch September 23, 2021 08:40
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