Browse Source

Transaction: remove untestable assert

Also changes the fromBuffer sanity test to use a clearer message that is
taken from the fixtures.
hk-custom-address
Daniel Cousens 11 years ago
parent
commit
4850570955
  1. 3
      src/transaction.js
  2. 2
      test/transaction.js

3
src/transaction.js

@ -144,7 +144,6 @@ Transaction.prototype.toBuffer = function () {
})
writeUInt32(this.locktime)
assert.equal(offset, buffer.length, 'Invalid transaction object')
return buffer
}
@ -286,7 +285,7 @@ Transaction.fromBuffer = function(buffer) {
}
tx.locktime = readUInt32()
assert.equal(offset, buffer.length, 'Invalid transaction')
assert.equal(offset, buffer.length, 'Transaction has unexpected data')
return tx
}

2
test/transaction.js

@ -36,7 +36,7 @@ describe('Transaction', function() {
it('throws on ' + f.exception, function() {
assert.throws(function() {
Transaction.fromHex(f.hex)
}, /Invalid transaction/)
}, new RegExp(f.exception))
})
})
})

Loading…
Cancel
Save