From 78046b3815ac525e86edde8f302b757369856f9e Mon Sep 17 00:00:00 2001 From: Dave Collins Date: Wed, 13 Mar 2019 01:11:51 -0500 Subject: [PATCH] txscript: Remove unused isNullData function. --- txscript/standard.go | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/txscript/standard.go b/txscript/standard.go index bae2b0c5..85b28582 100644 --- a/txscript/standard.go +++ b/txscript/standard.go @@ -386,24 +386,6 @@ func isWitnessScriptHashScript(script []byte) bool { return extractWitnessScriptHash(script) != nil } -// isNullData returns true if the passed script is a null data transaction, -// false otherwise. -func isNullData(pops []parsedOpcode) bool { - // A nulldata transaction is either a single OP_RETURN or an - // OP_RETURN SMALLDATA (where SMALLDATA is a data push up to - // MaxDataCarrierSize bytes). - l := len(pops) - if l == 1 && pops[0].opcode.value == OP_RETURN { - return true - } - - return l == 2 && - pops[0].opcode.value == OP_RETURN && - (isSmallInt(pops[1].opcode.value) || pops[1].opcode.value <= - OP_PUSHDATA4) && - len(pops[1].data) <= MaxDataCarrierSize -} - // isNullDataScript returns whether or not the passed script is a standard // null data script. //