tests: add failing Coinbase transaction fixture
This commit is contained in:
parent
db17e35013
commit
445eb260c0
2 changed files with 32 additions and 1 deletions
test
24
test/fixtures/transaction.json
vendored
24
test/fixtures/transaction.json
vendored
File diff suppressed because one or more lines are too long
|
@ -16,7 +16,14 @@ describe('Transaction', function() {
|
||||||
|
|
||||||
raw.ins.forEach(function(txIn) {
|
raw.ins.forEach(function(txIn) {
|
||||||
var txHash = new Buffer(txIn.hash, 'hex')
|
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)
|
tx.addInput(txHash, txIn.index, txIn.sequence, script)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Reference in a new issue