Skip to content

Commit

Permalink
scripthash: avoid circular dep with P2WSH
Browse files Browse the repository at this point in the history
  • Loading branch information
dcousens committed Sep 26, 2017
1 parent 381bf24 commit e995bc6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/templates/scripthash/input.js
Expand Up @@ -7,8 +7,8 @@ var typeforce = require('typeforce')
var p2ms = require('../multisig/')
var p2pk = require('../pubkey/')
var p2pkh = require('../pubkeyhash/')
var p2wpkh = require('../witnesspubkeyhash/')
var p2wsh = require('../witnessscripthash/')
var p2wpkho = require('../witnesspubkeyhash/output')
var p2wsho = require('../witnessscripthash/output')

function check (script, allowIncomplete) {
var chunks = bscript.decompile(script)
Expand All @@ -28,8 +28,8 @@ function check (script, allowIncomplete) {

// is witness?
if (chunks.length === 1) {
return p2wsh.output.check(redeemScriptChunks) ||
p2wpkh.output.check(redeemScriptChunks)
return p2wsho.check(redeemScriptChunks) ||
p2wpkho.check(redeemScriptChunks)
}

// match types
Expand Down

0 comments on commit e995bc6

Please sign in to comment.