bufferutils: fix pushDataInt output
This commit is contained in:
parent
1f62235c38
commit
17c6ff62a0
2 changed files with 4 additions and 4 deletions
|
@ -10,8 +10,8 @@ function verifuint (value, max) {
|
|||
|
||||
function pushDataSize (i) {
|
||||
return i < opcodes.OP_PUSHDATA1 ? 1
|
||||
: i < 0xff ? 2
|
||||
: i < 0xffff ? 3
|
||||
: i <= 0xff ? 2
|
||||
: i <= 0xffff ? 3
|
||||
: 5
|
||||
}
|
||||
|
||||
|
|
4
test/fixtures/bufferutils.json
vendored
4
test/fixtures/bufferutils.json
vendored
|
@ -34,7 +34,7 @@
|
|||
"dec": 255,
|
||||
"hex64": "ff00000000000000",
|
||||
"hexVI": "fdff00",
|
||||
"hexPD": "4dff00"
|
||||
"hexPD": "4cff"
|
||||
},
|
||||
{
|
||||
"dec": 65534,
|
||||
|
@ -46,7 +46,7 @@
|
|||
"dec": 65535,
|
||||
"hex64": "ffff000000000000",
|
||||
"hexVI": "fdffff",
|
||||
"hexPD": "4effff0000"
|
||||
"hexPD": "4dffff"
|
||||
},
|
||||
{
|
||||
"dec": 65536,
|
||||
|
|
Loading…
Add table
Reference in a new issue