TxBuilder: add failing test for non-zero vin inputs
This commit is contained in:
parent
43d135c4b3
commit
1c744cfa5a
2 changed files with 21 additions and 0 deletions
20
test/fixtures/transaction_builder.json
vendored
20
test/fixtures/transaction_builder.json
vendored
|
@ -63,6 +63,26 @@
|
|||
"value": 10000
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"description": "Transaction w/ non-zero vin inputs",
|
||||
"txid": "7d9b699f26765fdfdd598223a952a6e129f8c159e2e05e911af822ee743fa745",
|
||||
"txhex": "0100000001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff010000006a47304402205c80bbb5125b35d5e5a8324b1336832d29a6fc004859c8a9ff6bef47ba7fc348022018612216e57a521b2c4543f1f4fd738a76814c37c074e88adfe12464fff31cf901210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ffffffff0110270000000000001976a914aa4d7985c57e011a8b3dd8e0e5a73aaef41629c588ac00000000",
|
||||
"inputs": [
|
||||
{
|
||||
"index": 1,
|
||||
"prevTx": "ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
|
||||
"privKeys": [
|
||||
"KwDiBf89QgGbjEhKnhXJuH7LrciVrZi3qYjgd9M7rFU73sVHnoWn"
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"script": "OP_DUP OP_HASH160 aa4d7985c57e011a8b3dd8e0e5a73aaef41629c5 OP_EQUALVERIFY OP_CHECKSIG",
|
||||
"value": 10000
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
|
|
@ -182,6 +182,7 @@ describe('TransactionBuilder', function() {
|
|||
var tx = txb.build()
|
||||
|
||||
assert.equal(tx.getId(), f.txid)
|
||||
assert.equal(tx.toHex(), f.txhex)
|
||||
})
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in a new issue