aboutsummaryrefslogtreecommitdiff
path: root/src/script/script.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2016-04-25 12:32:01 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2016-04-25 14:22:30 +0200
commit4f87af6fc7580912726f9bf833c21e6e1b478e1d (patch)
tree088a073fa227654bdfc16b28a090dfb23c21b239 /src/script/script.h
parentf8e6fb1800fbac87e76cdddc074d8f4af585f050 (diff)
Treat overly long scriptPubKeys as unspendable
Diffstat (limited to 'src/script/script.h')
-rw-r--r--src/script/script.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/script/script.h b/src/script/script.h
index 68cde03e34..2a338d6f5c 100644
--- a/src/script/script.h
+++ b/src/script/script.h
@@ -624,7 +624,7 @@ public:
*/
bool IsUnspendable() const
{
- return (size() > 0 && *begin() == OP_RETURN);
+ return (size() > 0 && *begin() == OP_RETURN) || (size() > MAX_SCRIPT_SIZE);
}
void clear()