tests: add failing Coinbase transaction fixture

This commit is contained in:
Daniel Cousens 2015-02-19 12:04:17 +11:00
parent db17e35013
commit 445eb260c0
2 changed files with 32 additions and 1 deletions

File diff suppressed because one or more lines are too long

View file

@ -16,7 +16,14 @@ describe('Transaction', function() {
raw.ins.forEach(function(txIn) {
var txHash = new Buffer(txIn.hash, 'hex')
var script = txIn.script ? Script.fromASM(txIn.script) : undefined
var script
if (txIn.data) {
script = new Script(new Buffer(txIn.data, 'hex'), [])
} else if (txIn.script) {
script = Script.fromASM(txIn.script)
}
tx.addInput(txHash, txIn.index, txIn.sequence, script)
})