Skip to content

Commit 8bd95bd

Browse files
authored
redeemScript, not witnessScript
1 parent 30ffd78 commit 8bd95bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/integration/addresses.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ describe('bitcoinjs-lib (addresses)', function () {
6161
var keyPair = bitcoin.ECPair.fromWIF('Kxr9tQED9H44gCmp6HAdmemAzU3n84H3dGkuWTKvE23JgHMW8gct')
6262
var pubKey = keyPair.getPublicKeyBuffer()
6363

64-
var witnessScript = bitcoin.script.witnessPubKeyHash.output.encode(bitcoin.crypto.hash160(pubKey))
65-
var scriptPubKey = bitcoin.script.scriptHash.output.encode(bitcoin.crypto.hash160(witnessScript))
64+
var redeemScript = bitcoin.script.witnessPubKeyHash.output.encode(bitcoin.crypto.hash160(pubKey))
65+
var scriptPubKey = bitcoin.script.scriptHash.output.encode(bitcoin.crypto.hash160(redeemScript))
6666
var address = bitcoin.address.fromOutputScript(scriptPubKey)
6767

6868
assert.strictEqual(address, '34AgLJhwXrvmkZS1o5TrcdeevMt22Nar53')

0 commit comments

Comments
 (0)