TxBuilder: use data fixtures for invalid tests
This commit is contained in:
parent
bcbcd58964
commit
36b225a3df
3 changed files with 49 additions and 55 deletions
|
@ -118,6 +118,7 @@ TransactionBuilder.prototype.build = function(allowIncomplete) {
|
|||
if (!allowIncomplete) {
|
||||
assert(this.tx.ins.length > 0, 'Transaction has no inputs')
|
||||
assert(this.tx.outs.length > 0, 'Transaction has no outputs')
|
||||
assert(this.signatures.length > 0, 'Transaction has no signatures')
|
||||
assert.equal(this.signatures.length, this.tx.ins.length, 'Transaction is missing signatures')
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue