Revert "bufferutils: remove equal, use Buffer.compare"
This reverts commit 75540b6116
.
See discussion in https://github.com/bitcoinjs/bitcoinjs-lib/pull/410
This commit is contained in:
parent
f64df79555
commit
d7019e7492
2 changed files with 13 additions and 2 deletions
|
@ -399,7 +399,7 @@ TransactionBuilder.prototype.sign = function (index, keyPair, redeemScript, hash
|
|||
|
||||
// enforce in order signing of public keys
|
||||
assert(input.pubKeys.some(function (pubKey, i) {
|
||||
if (kpPubKey.compare(pubKey) !== 0) return false
|
||||
if (!bufferutils.equal(kpPubKey, pubKey)) return false
|
||||
|
||||
assert(!input.signatures[i], 'Signature already exists')
|
||||
|
||||
|
@ -407,7 +407,7 @@ TransactionBuilder.prototype.sign = function (index, keyPair, redeemScript, hash
|
|||
input.signatures[i] = signature
|
||||
|
||||
return true
|
||||
}), 'key pair cannot sign for this input')
|
||||
}, this), 'key pair cannot sign for this input')
|
||||
}
|
||||
|
||||
module.exports = TransactionBuilder
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue