Browse Source

tests: add failing Coinbase transaction fixture

hk-custom-address
Daniel Cousens 10 years ago
parent
commit
445eb260c0
  1. 24
      test/fixtures/transaction.json
  2. 9
      test/transaction.js

24
test/fixtures/transaction.json

File diff suppressed because one or more lines are too long

9
test/transaction.js

@ -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)
})

Loading…
Cancel
Save