bufferutils: fix pushDataInt output

This commit is contained in:
Daniel Cousens 2016-08-31 13:40:11 +10:00
parent 1f62235c38
commit 17c6ff62a0
2 changed files with 4 additions and 4 deletions

View file

@ -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
}

View file

@ -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,