From b3438c5ef2636711011afe481650670dc4f2d273 Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Sat, 30 Aug 2014 12:51:29 +1000 Subject: [PATCH] Transaction: throw if sequence is not a number --- src/transaction.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/transaction.js b/src/transaction.js index a9a0899..ffb9522 100644 --- a/src/transaction.js +++ b/src/transaction.js @@ -52,6 +52,7 @@ Transaction.prototype.addInput = function(tx, index, sequence) { assert(Buffer.isBuffer(hash), 'Expected Transaction, txId or txHash, got ' + tx) assert.equal(hash.length, 32, 'Expected hash length of 32, got ' + hash.length) assert.equal(typeof index, 'number', 'Expected number index, got ' + index) + assert.equal(typeof sequence, 'number', 'Expected number sequence, got ' + sequence) // Add the input and return the input's index return (this.ins.push({