TxBuilder: remove unnecessary assert
This commit is contained in:
parent
14211b5f3e
commit
1e3e003120
2 changed files with 0 additions and 8 deletions
|
@ -24,8 +24,6 @@ TransactionBuilder.prototype.addInput = function(prevTx, index, prevOutScript) {
|
|||
Array.prototype.reverse.call(prevOutHash)
|
||||
|
||||
} else if (prevTx instanceof Transaction) {
|
||||
assert(prevOutScript === undefined, 'Unnecessary Script provided')
|
||||
|
||||
prevOutHash = prevTx.getHash()
|
||||
prevOutScript = prevTx.outs[index].script
|
||||
|
||||
|
|
|
@ -68,12 +68,6 @@ describe('TransactionBuilder', function() {
|
|||
assert.equal(txb.addInput(prevTxHash, 1), 1)
|
||||
})
|
||||
|
||||
it('throws if a Tx and prevOutScript is given', function() {
|
||||
assert.throws(function() {
|
||||
txb.addInput(prevTx, 0, privScript)
|
||||
}, /Unnecessary Script provided/)
|
||||
})
|
||||
|
||||
it('throws if prevOutScript is not supported', function() {
|
||||
assert.throws(function() {
|
||||
txb.addInput(prevTxHash, 0, Script.EMPTY)
|
||||
|
|
Loading…
Reference in a new issue