From 9ac471821832e7fc086eae0859a451ebccc4f6d0 Mon Sep 17 00:00:00 2001 From: Neil Booth Date: Sun, 13 Nov 2016 21:55:18 +0900 Subject: [PATCH] OP_RETURN can be spent inside false conditions See tx 928ed84cd4c48beb0d3494ccc17cc1e06b1473f9dc118db9bb56972395ede461 --- lib/script.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/script.py b/lib/script.py index e73bf56..6391c81 100644 --- a/lib/script.py +++ b/lib/script.py @@ -107,7 +107,7 @@ class ScriptPubKey(object): return handlers.script_hash(ops[1][-1]) if match(ops, cls.TO_PUBKEY_OPS): return handlers.pubkey(ops[0][-1]) - if OpCodes.OP_RETURN in ops: + if ops and ops[0] == OpCodes.OP_RETURN: return handlers.unspendable() return handlers.strange(script)