add Block.calculateTarget, use Buffer comparison rather than bigi
This commit is contained in:
parent
26ccb43047
commit
86b51b2d62
4 changed files with 45 additions and 10 deletions
test/fixtures
20
test/fixtures/block.json
vendored
20
test/fixtures/block.json
vendored
|
@ -1,4 +1,22 @@
|
|||
|
||||
{
|
||||
"targets": [
|
||||
{
|
||||
"bits": "1d00ffff",
|
||||
"expected": "00000000ffff0000000000000000000000000000000000000000000000000000"
|
||||
},
|
||||
{
|
||||
"bits": "1b80ffff",
|
||||
"expected": "000000000080ffff000000000000000000000000000000000000000000000000"
|
||||
},
|
||||
{
|
||||
"bits": "1b0404cb",
|
||||
"expected": "00000000000404cb000000000000000000000000000000000000000000000000"
|
||||
},
|
||||
{
|
||||
"bits": "1814dd04",
|
||||
"expected": "000000000000000014dd04000000000000000000000000000000000000000000"
|
||||
}
|
||||
],
|
||||
"valid": [
|
||||
{
|
||||
"description": "Headers only",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue