TxBuilder: fix equals is undefined in Node 0.10

This commit is contained in:
Daniel Cousens 2015-08-18 14:55:01 +10:00
parent 97a0008445
commit c06df2df8a

View file

@ -305,7 +305,7 @@ TransactionBuilder.prototype.sign = function (index, keyPair, redeemScript, hash
if (canSign) {
// if redeemScript was provided, enforce consistency
if (redeemScript) {
if (!input.redeemScript.equals(redeemScript)) throw new Error('Inconsistent redeemScript')
if (!bufferutils.equal(input.redeemScript, redeemScript)) throw new Error('Inconsistent redeemScript')
}
if (input.hashType !== hashType) throw new Error('Inconsistent hashType')