Skip to content

Commit

Permalink
docs: added info on the block._difficulty property and explain its ne…
Browse files Browse the repository at this point in the history
…cessity (#2821).
  • Loading branch information
ricmoo committed Apr 29, 2022
1 parent 24c3caa commit bd152f7
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs.wrm/api/providers/types.wrm
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,21 @@ This property is generally of little interest to developers.
_property: block.difficulty => number
The difficulty target required to be met by the miner of the block.

Recently the difficulty frequently exceeds the size that a JavaScript
number can safely store (53-bits), so in that case this property may
be null. It is recommended to use the `_difficulty` property below,
which will always return a value, but as a [[BigNumber]].

This property is generally of little interest to developers.

_property: block._difficulty => [[BigNumnber]]
The difficulty target required to be met by the miner of the block,
as a [[BigNumber]].

Recently the difficulty frequently exceeds the size that a JavaScript
number can safely store (53-bits), so this property was added to
safely encode the value for applications that require it.

This property is generally of little interest to developers.

_property: block.gasLimit => [[BigNumber]]
Expand Down

0 comments on commit bd152f7

Please sign in to comment.