script: adhere to latest standard precedence rules
This commit is contained in:
parent
8e1c69183f
commit
846da39346
2 changed files with 4 additions and 4 deletions
|
@ -75,7 +75,7 @@
|
||||||
"nyc": "^8.1.0",
|
"nyc": "^8.1.0",
|
||||||
"proxyquire": "^1.4.0",
|
"proxyquire": "^1.4.0",
|
||||||
"sinon": "^1.12.2",
|
"sinon": "^1.12.2",
|
||||||
"standard": "^8.0.0"
|
"standard": "^9.0.2"
|
||||||
},
|
},
|
||||||
"license": "MIT"
|
"license": "MIT"
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,9 +10,9 @@ var OP_INT_BASE = OPS.OP_RESERVED // OP_1 - 1
|
||||||
|
|
||||||
function isOPInt (value) {
|
function isOPInt (value) {
|
||||||
return types.Number(value) &&
|
return types.Number(value) &&
|
||||||
(value === OPS.OP_0) ||
|
((value === OPS.OP_0) ||
|
||||||
(value >= OPS.OP_1 && value <= OPS.OP_16) ||
|
(value >= OPS.OP_1 && value <= OPS.OP_16) ||
|
||||||
(value === OPS.OP_1NEGATE)
|
(value === OPS.OP_1NEGATE))
|
||||||
}
|
}
|
||||||
|
|
||||||
function isPushOnlyChunk (value) {
|
function isPushOnlyChunk (value) {
|
||||||
|
@ -33,7 +33,7 @@ function compile (chunks) {
|
||||||
// data chunk
|
// data chunk
|
||||||
if (Buffer.isBuffer(chunk)) {
|
if (Buffer.isBuffer(chunk)) {
|
||||||
// adhere to BIP62.3, minimal push policy
|
// adhere to BIP62.3, minimal push policy
|
||||||
if (chunk.length === 1 && (chunk[0] === 0x81 || chunk[0] >= 1 && chunk[0] <= 16)) {
|
if (chunk.length === 1 && (chunk[0] === 0x81 || (chunk[0] >= 1 && chunk[0] <= 16))) {
|
||||||
return accum + 1
|
return accum + 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue