From 29b93b8a5c393a21865a359d2491faec5664d2e8 Mon Sep 17 00:00:00 2001
From: Daniel Cousens <github@dcousens.com>
Date: Thu, 5 Mar 2015 19:16:22 +1100
Subject: [PATCH] integration: change 2-of-3 to 2-of-4 and update README

---
 README.md                    | 2 +-
 test/integration/multisig.js | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/README.md b/README.md
index 045332e..3529f52 100644
--- a/README.md
+++ b/README.md
@@ -90,7 +90,7 @@ The below examples are implemented as integration tests, they should be very eas
 - [Verify a Bitcoin message](https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/test/integration/advanced.js#L17)
 - [Create an OP RETURN transaction](https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/test/integration/advanced.js#L24)
 - [Create a 2-of-3 multisig P2SH address](https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/test/integration/multisig.js#L8)
-- [Spend from a 2-of-2 multisig P2SH address](https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/test/integration/multisig.js#L22)
+- [Spend from a 2-of-4 multisig P2SH address](https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/test/integration/multisig.js#L22)
 - [Generate a single-key stealth address](https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/test/integration/crypto.js#L7)
 - [Generate a dual-key stealth address](https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/test/integration/crypto.js#L42)
 - [Recover a BIP32 parent private key from the parent public key and a derived non-hardened child private key](https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/test/integration/crypto.js#L44)
diff --git a/test/integration/multisig.js b/test/integration/multisig.js
index 80ed051..32be5e2 100644
--- a/test/integration/multisig.js
+++ b/test/integration/multisig.js
@@ -19,19 +19,20 @@ describe('bitcoinjs-lib (multisig)', function () {
     assert.equal(address, '36NUkt6FWUi3LAWBqWRdDmdTWbt91Yvfu7')
   })
 
-  it('can spend from a 2-of-3 multsig P2SH address', function (done) {
+  it('can spend from a 2-of-4 multsig P2SH address', function (done) {
     this.timeout(20000)
 
     var privKeys = [
       '91avARGdfge8E4tZfYLoxeJ5sGBdNJQH4kvjJoQFacbgwmaKkrx',
       '91avARGdfge8E4tZfYLoxeJ5sGBdNJQH4kvjJoQFacbgww7vXtT',
-      '91avARGdfge8E4tZfYLoxeJ5sGBdNJQH4kvjJoQFacbgx3cTMqe'
+      '91avARGdfge8E4tZfYLoxeJ5sGBdNJQH4kvjJoQFacbgx3cTMqe',
+      '91avARGdfge8E4tZfYLoxeJ5sGBdNJQH4kvjJoQFacbgx9rcrL7'
     ].map(bitcoin.ECKey.fromWIF)
     var pubKeys = privKeys.map(function (x) {
       return x.pub
     })
 
-    var redeemScript = bitcoin.scripts.multisigOutput(2, pubKeys) // 2 of 3
+    var redeemScript = bitcoin.scripts.multisigOutput(2, pubKeys) // 2 of 4
     var scriptPubKey = bitcoin.scripts.scriptHashOutput(redeemScript.getHash())
     var address = bitcoin.Address.fromOutputScript(scriptPubKey, bitcoin.networks.testnet).toString()