From aa1014c87bbf801d03c7b31d4bd2195985c1cca5 Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Fri, 19 Apr 2019 20:09:59 -0700 Subject: [PATCH] txscript: Remove unused isWitnessProgram --- txscript/script.go | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/txscript/script.go b/txscript/script.go index 8ff39e20..6557c64d 100644 --- a/txscript/script.go +++ b/txscript/script.go @@ -98,21 +98,6 @@ func IsWitnessProgram(script []byte) bool { return isWitnessProgramScript(script) } -// isWitnessProgram returns true if the passed script is a witness program, and -// false otherwise. A witness program MUST adhere to the following constraints: -// there must be exactly two pops (program version and the program itself), the -// first opcode MUST be a small integer (0-16), the push data MUST be -// canonical, and finally the size of the push data must be between 2 and 40 -// bytes. -// -// DEPRECATED: Use isWitnessProgramScript instead. -func isWitnessProgram(pops []parsedOpcode) bool { - return len(pops) == 2 && - isSmallInt(pops[0].opcode.value) && - isCanonicalPush(pops[1].opcode.value, pops[1].data) && - (len(pops[1].data) >= 2 && len(pops[1].data) <= 40) -} - // IsNullData returns true if the passed script is a null data script, false // otherwise. func IsNullData(script []byte) bool {