scripts: add missing test data
This commit is contained in:
parent
8b1e2c5e1e
commit
924ecfb998
2 changed files with 18 additions and 17 deletions
16
test/fixtures/scripts.json
vendored
16
test/fixtures/scripts.json
vendored
|
@ -30,13 +30,17 @@
|
|||
{
|
||||
"type": "multisig",
|
||||
"pubKeys": [
|
||||
"02ea1297665dd733d444f31ec2581020004892cdaaf3dd6c0107c615afb839785f",
|
||||
"02fab2dea1458990793f56f42e4a47dbf35a12a351f26fa5d7e0cc7447eaafa21f",
|
||||
"036c6802ce7e8113723dd92cdb852e492ebb157a871ca532c3cb9ed08248ff0e19"
|
||||
"0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",
|
||||
"02b80011a883a0fd621ad46dfc405df1e74bf075cbaf700fd4aebef6e96f848340",
|
||||
"024289801366bcee6172b771cf5a7f13aaecd237a0b9a1ff9d769cabc2e6b70a34"
|
||||
],
|
||||
"signatures": [],
|
||||
"scriptPubKey": "532102ea1297665dd733d444f31ec2581020004892cdaaf3dd6c0107c615afb839785f2102fab2dea1458990793f56f42e4a47dbf35a12a351f26fa5d7e0cc7447eaafa21f21036c6802ce7e8113723dd92cdb852e492ebb157a871ca532c3cb9ed08248ff0e1953ae",
|
||||
"scriptSig": ""
|
||||
"signatures": [
|
||||
"3045022100fe324541215798b2df68cbd44039615e23c506d4ec1a05572064392a98196b82022068c849fa6699206da2fc6d7848efc1d3804a5816d6293615fe34c1a7f34e1c2f01",
|
||||
"3044022001ab168e80b863fdec694350b587339bb72a37108ac3c989849251444d13ebba02201811272023e3c1038478eb972a82d3ad431bfc2408e88e4da990f1a7ecbb263901",
|
||||
"3045022100aaeb7204c17eee2f2c4ff1c9f8b39b79e75e7fbf33e92cc67ac51be8f15b75f90220659eee314a4943a6384d2b154fa5821ef7a084814d7ee2c6f9f7f0ffb53be34b01"
|
||||
],
|
||||
"scriptPubKey": "53210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f817982102b80011a883a0fd621ad46dfc405df1e74bf075cbaf700fd4aebef6e96f84834021024289801366bcee6172b771cf5a7f13aaecd237a0b9a1ff9d769cabc2e6b70a3453ae",
|
||||
"scriptSig": "00483045022100fe324541215798b2df68cbd44039615e23c506d4ec1a05572064392a98196b82022068c849fa6699206da2fc6d7848efc1d3804a5816d6293615fe34c1a7f34e1c2f01473044022001ab168e80b863fdec694350b587339bb72a37108ac3c989849251444d13ebba02201811272023e3c1038478eb972a82d3ad431bfc2408e88e4da990f1a7ecbb263901483045022100aaeb7204c17eee2f2c4ff1c9f8b39b79e75e7fbf33e92cc67ac51be8f15b75f90220659eee314a4943a6384d2b154fa5821ef7a084814d7ee2c6f9f7f0ffb53be34b01"
|
||||
},
|
||||
{
|
||||
"type": "scripthash",
|
||||
|
|
|
@ -90,19 +90,16 @@ describe('Scripts', function() {
|
|||
var pubKeys = f.pubKeys.map(ECPubKey.fromHex)
|
||||
var scriptPubKey = scripts.multisigOutput(pubKeys.length, pubKeys)
|
||||
|
||||
// FIXME: some missing test data for now
|
||||
if (f.scriptSig) {
|
||||
describe('input script', function() {
|
||||
it('is generated correctly for ' + scriptPubKey.toHex(), function() {
|
||||
var signatures = f.signatures.map(function(signature) {
|
||||
return new Buffer(signature, 'hex')
|
||||
})
|
||||
|
||||
var scriptSig = scripts.multisigInput(signatures)
|
||||
assert.equal(scriptSig.toHex(), f.scriptSig)
|
||||
describe('input script', function() {
|
||||
it('is generated correctly for ' + scriptPubKey.toHex(), function() {
|
||||
var signatures = f.signatures.map(function(signature) {
|
||||
return new Buffer(signature, 'hex')
|
||||
})
|
||||
|
||||
var scriptSig = scripts.multisigInput(signatures)
|
||||
assert.equal(scriptSig.toHex(), f.scriptSig)
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
describe('output script', function() {
|
||||
it('is generated correctly for ' + scriptPubKey.toHex(), function() {
|
||||
|
|
Loading…
Add table
Reference in a new issue