From a71685658b48fa38d4a3174a5d8dabc818f0af77 Mon Sep 17 00:00:00 2001 From: Wei Lu Date: Tue, 13 May 2014 21:50:44 +0800 Subject: [PATCH 1/2] add integration build to travis --- .travis.yml | 4 ++++ package.json | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 84af85e..e5debe2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,3 +4,7 @@ before_install: node_js: - "0.11" - "0.10" +env: + - TEST_SUITE=unit + - TEST_SUITE=integration +script: "npm run-script $TEST_SUITE" diff --git a/package.json b/package.json index 1a65c9b..495e486 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,8 @@ "files": "test/*.js" }, "scripts": { - "test": "./node_modules/.bin/istanbul test ./node_modules/.bin/_mocha -- --reporter list `find test -maxdepth 1 -not -type d`", + "unit": "./node_modules/.bin/istanbul test ./node_modules/.bin/_mocha -- --reporter list `find test -maxdepth 1 -not -type d`", + "test": "npm run-script unit", "integration": "./node_modules/.bin/_mocha --reporter list test/integration/*.js", "coverage": "./node_modules/.bin/istanbul cover ./node_modules/.bin/_mocha -- --reporter list test/*.js", "compile": "./node_modules/.bin/browserify ./src/index.js -s Bitcoin | ./node_modules/.bin/uglifyjs > bitcoinjs-min.js" From 8063979d99f37bbfeca2f1935ec8c42b7c774cbe Mon Sep 17 00:00:00 2001 From: Wei Lu Date: Tue, 13 May 2014 22:01:40 +0800 Subject: [PATCH 2/2] fix integration test --- test/integration/p2sh.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/integration/p2sh.js b/test/integration/p2sh.js index bb433a7..72c3f75 100644 --- a/test/integration/p2sh.js +++ b/test/integration/p2sh.js @@ -30,7 +30,7 @@ describe('p2sh', function() { var pubKeyBuffers = pubKeys.map(function(q) { return q.toBuffer() }) - var redeemScript = Script.createMultisigOutputScript(2, pubKeyBuffers) + var redeemScript = Script.createMultisigScriptPubKey(2, pubKeyBuffers) var hash160 = crypto.hash160(redeemScript.buffer) var multisigAddress = new Address(hash160, networks.testnet.scriptHash) @@ -57,7 +57,8 @@ describe('p2sh', function() { return tx.signScriptSig(0, redeemScript, privKey) }) - var scriptSig = Script.createP2SHMultisigScriptSig(signatures, redeemScript) + var redeemScriptSig = Script.createMultisigScriptSig(signatures) + var scriptSig = Script.createP2SHScriptSig(redeemScriptSig, redeemScript) tx.setScriptSig(0, scriptSig) // Send from mutlsigAddress to targetAddress