From 8bd95bd49808c9eeba2b065ef6552c7a9d07963e Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Mon, 18 Dec 2017 10:18:12 +1100 Subject: [PATCH] redeemScript, not witnessScript --- test/integration/addresses.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/integration/addresses.js b/test/integration/addresses.js index 9a132f2..cc174a2 100644 --- a/test/integration/addresses.js +++ b/test/integration/addresses.js @@ -61,8 +61,8 @@ describe('bitcoinjs-lib (addresses)', function () { var keyPair = bitcoin.ECPair.fromWIF('Kxr9tQED9H44gCmp6HAdmemAzU3n84H3dGkuWTKvE23JgHMW8gct') var pubKey = keyPair.getPublicKeyBuffer() - var witnessScript = bitcoin.script.witnessPubKeyHash.output.encode(bitcoin.crypto.hash160(pubKey)) - var scriptPubKey = bitcoin.script.scriptHash.output.encode(bitcoin.crypto.hash160(witnessScript)) + var redeemScript = bitcoin.script.witnessPubKeyHash.output.encode(bitcoin.crypto.hash160(pubKey)) + var scriptPubKey = bitcoin.script.scriptHash.output.encode(bitcoin.crypto.hash160(redeemScript)) var address = bitcoin.address.fromOutputScript(scriptPubKey) assert.strictEqual(address, '34AgLJhwXrvmkZS1o5TrcdeevMt22Nar53')