use keyPair() in script.verify. whitespace.
This commit is contained in:
parent
a18a501c37
commit
2e7892c798
@ -183,7 +183,7 @@ script.verify = function verify(hash, sig, pub) {
|
||||
var k;
|
||||
|
||||
try {
|
||||
k = bcoin.ecdsa.keyFromPublic(pub);
|
||||
k = bcoin.ecdsa.keyPair({ pub: pub });
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
@ -774,7 +774,7 @@ script.execute = function execute(s, stack, tx, index, recurse) {
|
||||
|
||||
threshold = constants.locktimeThreshold;
|
||||
if (!(
|
||||
(tx.lock < threshold && lock < threshold)
|
||||
(tx.lock < threshold && lock < threshold)
|
||||
|| (tx.lock >= threshold && lock >= threshold)
|
||||
)) {
|
||||
return false;
|
||||
@ -799,6 +799,7 @@ script.execute = function execute(s, stack, tx, index, recurse) {
|
||||
return false;
|
||||
|
||||
evalScript = stack.pop();
|
||||
|
||||
if (!Array.isArray(evalScript))
|
||||
return false;
|
||||
|
||||
@ -1128,6 +1129,9 @@ script.isScripthashInput = function isScripthashInput(s, redeem) {
|
||||
script.isValidSig = function(sig) {
|
||||
var lenR, lenS;
|
||||
|
||||
if (!Array.isArray(sig))
|
||||
return false;
|
||||
|
||||
// Empty signature. Not strictly DER encoded, but allowed to provide a
|
||||
// compact way to provide an invalid signature for use with CHECK(MULTI)SIG
|
||||
if (sig.length === 0)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user