Skip to content

Commit bd152f7

Browse files
committedApr 29, 2022
docs: added info on the block._difficulty property and explain its necessity (#2821).

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
 

‎docs.wrm/api/providers/types.wrm

+15
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,21 @@ This property is generally of little interest to developers.
7373
_property: block.difficulty => number
7474
The difficulty target required to be met by the miner of the block.
7575

76+
Recently the difficulty frequently exceeds the size that a JavaScript
77+
number can safely store (53-bits), so in that case this property may
78+
be null. It is recommended to use the `_difficulty` property below,
79+
which will always return a value, but as a [[BigNumber]].
80+
81+
This property is generally of little interest to developers.
82+
83+
_property: block._difficulty => [[BigNumnber]]
84+
The difficulty target required to be met by the miner of the block,
85+
as a [[BigNumber]].
86+
87+
Recently the difficulty frequently exceeds the size that a JavaScript
88+
number can safely store (53-bits), so this property was added to
89+
safely encode the value for applications that require it.
90+
7691
This property is generally of little interest to developers.
7792

7893
_property: block.gasLimit => [[BigNumber]]

0 commit comments

Comments
 (0)
Please sign in to comment.