From 2b5d25c8515b22a299da2756fb8332063fec1142 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Thu, 20 Jan 2022 15:27:08 +1030 Subject: [PATCH] common: remove stderr debug in is_valid_witnessprog. Signed-off-by: Rusty Russell --- common/shutdown_scriptpubkey.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/common/shutdown_scriptpubkey.c b/common/shutdown_scriptpubkey.c index 866931ee5..ad79ff20f 100644 --- a/common/shutdown_scriptpubkey.c +++ b/common/shutdown_scriptpubkey.c @@ -2,8 +2,6 @@ #include #include -#include - /* BOLT #2: * 5. if (and only if) `option_shutdown_anysegwit` is negotiated: * * `OP_1` through `OP_16` inclusive, followed by a single @@ -36,20 +34,15 @@ static bool is_valid_witnessprog(const u8 *scriptpubkey) case OP_16: break; default: - fprintf(stderr, "op = %u (invalid)\n", scriptpubkey[0]); return false; } pushlen = scriptpubkey[1]; /* Must be all of the rest of scriptpubkey */ if (2 + pushlen != tal_bytelen(scriptpubkey)) { - fprintf(stderr, "2 + %zu != %zu\n", pushlen, tal_bytelen(scriptpubkey)); return false; } - if (!(pushlen >= 2 && pushlen <= 40)) - fprintf(stderr, "pushlen == %zu\n", pushlen); - return pushlen >= 2 && pushlen <= 40; }