common: remove stderr debug in is_valid_witnessprog.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
be299c0d59
commit
2b5d25c851
|
@ -2,8 +2,6 @@
|
||||||
#include <bitcoin/script.h>
|
#include <bitcoin/script.h>
|
||||||
#include <common/shutdown_scriptpubkey.h>
|
#include <common/shutdown_scriptpubkey.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
/* BOLT #2:
|
/* BOLT #2:
|
||||||
* 5. if (and only if) `option_shutdown_anysegwit` is negotiated:
|
* 5. if (and only if) `option_shutdown_anysegwit` is negotiated:
|
||||||
* * `OP_1` through `OP_16` inclusive, followed by a single
|
* * `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:
|
case OP_16:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
fprintf(stderr, "op = %u (invalid)\n", scriptpubkey[0]);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
pushlen = scriptpubkey[1];
|
pushlen = scriptpubkey[1];
|
||||||
/* Must be all of the rest of scriptpubkey */
|
/* Must be all of the rest of scriptpubkey */
|
||||||
if (2 + pushlen != tal_bytelen(scriptpubkey)) {
|
if (2 + pushlen != tal_bytelen(scriptpubkey)) {
|
||||||
fprintf(stderr, "2 + %zu != %zu\n", pushlen, tal_bytelen(scriptpubkey));
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!(pushlen >= 2 && pushlen <= 40))
|
|
||||||
fprintf(stderr, "pushlen == %zu\n", pushlen);
|
|
||||||
|
|
||||||
return pushlen >= 2 && pushlen <= 40;
|
return pushlen >= 2 && pushlen <= 40;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue