diff --git a/lib/bcoin/tx.js b/lib/bcoin/tx.js index c6c2a4f2..05d3cd10 100644 --- a/lib/bcoin/tx.js +++ b/lib/bcoin/tx.js @@ -198,7 +198,7 @@ TX.prototype.signatureHashV0 = function signatureHashV0(index, prev, type) { if (typeof type === 'string') type = constants.hashType[type]; - assert(index >= 0 && index < copy.inputs.length); + assert(index >= 0 && index < this.inputs.length); assert(prev instanceof bcoin.script); // Clone the transaction.