From b933c6da44c9d8faed816d03a45df4904205d584 Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Tue, 18 Aug 2015 09:05:23 +1000 Subject: [PATCH] scripts: re-add constrained hash types to *HashOutput --- src/scripts.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/scripts.js b/src/scripts.js index 89a19d0..ff9d961 100644 --- a/src/scripts.js +++ b/src/scripts.js @@ -306,14 +306,14 @@ function pubKeyOutput (pubKey) { // OP_DUP OP_HASH160 {pubKeyHash} OP_EQUALVERIFY OP_CHECKSIG function pubKeyHashOutput (pubKeyHash) { - typeforce(typeforce.Buffer, pubKeyHash) + typeforce(types.Hash160bit, pubKeyHash) return compile([OPS.OP_DUP, OPS.OP_HASH160, pubKeyHash, OPS.OP_EQUALVERIFY, OPS.OP_CHECKSIG]) } // OP_HASH160 {scriptHash} OP_EQUAL function scriptHashOutput (scriptHash) { - typeforce(typeforce.Buffer, scriptHash) + typeforce(types.Hash160bit, scriptHash) return compile([OPS.OP_HASH160, scriptHash, OPS.OP_EQUAL]) }