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 the usage description of block.difficulty and block._difficulty in v5 #2821

Closed
wants to merge 4 commits into from

Conversation

a2468834
Copy link

According to #2001 & #2036, block.difficulty could give results that overflow IEEE754 number representation. Therefore, @ricmoo had fixed this issue, but it seems that the docs didn't updated yet.

@ricmoo
Copy link
Member

ricmoo commented Mar 18, 2022

It can still return a number of the difficulty fits in 53 bits, it’s only null when it exceeds it. I’ll update the docs shortly, as I have other docs changes coming.

@a2468834
Copy link
Author

Oh, I got it!

I frequently got null when I call block.difficulty these days (for testing my deploying script), so I have misunderstood this property is deprecated.

Thanks for explaining how the property is working.

@ricmoo ricmoo added documentation Documentation related issue. on-deck This Enhancement or Bug is currently being worked on. labels Apr 13, 2022
ricmoo added a commit that referenced this pull request May 1, 2022
ricmoo added a commit that referenced this pull request May 1, 2022
@ricmoo
Copy link
Member

ricmoo commented May 3, 2022

Merged!

Thanks! :)

@ricmoo ricmoo closed this May 3, 2022
@ricmoo ricmoo added fixed/complete This Bug is fixed or Enhancement is complete and published. and removed on-deck This Enhancement or Bug is currently being worked on. labels May 3, 2022
Woodpile37 pushed a commit to Woodpile37/ethers.js that referenced this pull request Jan 14, 2024
Woodpile37 pushed a commit to Woodpile37/ethers.js that referenced this pull request Jan 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation related issue. fixed/complete This Bug is fixed or Enhancement is complete and published.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants