Remove Number.isFinite check on tx input index

This commit is contained in:
Wei Lu 2014-05-03 10:19:38 +08:00
parent 39516d5532
commit 1e6b283f9a

View file

@ -361,7 +361,7 @@ Transaction.prototype.signWithKeys = function(keys, outputs, type) {
Transaction.prototype.signScriptSig = function(index, script, key, type) { Transaction.prototype.signScriptSig = function(index, script, key, type) {
type = type || SIGHASH_ALL type = type || SIGHASH_ALL
assert(Number.isFinite(index) && (index >= 0), 'Invalid vin index') assert((index >= 0), 'Invalid vin index')
assert(script instanceof Script, 'Invalid Script object') assert(script instanceof Script, 'Invalid Script object')
assert(key instanceof ECKey, 'Invalid private key') assert(key instanceof ECKey, 'Invalid private key')
// assert.equal(type & 0x7F, type, 'Invalid type') // TODO // assert.equal(type & 0x7F, type, 'Invalid type') // TODO