From b3f781a0ef4b763ef7ba8b5b20871a7707ec090e Mon Sep 17 00:00:00 2001 From: Antoine Poinsot Date: Fri, 8 Aug 2025 13:16:15 -0400 Subject: [PATCH] contrib: adapt max reject string size in tracing demo The Script errors were last touched in 2020. This value was calculated after that in 2022 (commit 4b7aec2951fe4595946cdc804b0dec1921d79d05). The previous commit made the size of the largest reject reason string 4 characters smaller ("mandatory" became "block"), so adapt the constant. --- contrib/tracing/mempool_monitor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/tracing/mempool_monitor.py b/contrib/tracing/mempool_monitor.py index ddba9d041ff..c5f672fb954 100755 --- a/contrib/tracing/mempool_monitor.py +++ b/contrib/tracing/mempool_monitor.py @@ -17,9 +17,9 @@ from bcc import BPF, USDT PROGRAM = """ # include -// The longest rejection reason is 118 chars and is generated in case of SCRIPT_ERR_EVAL_FALSE by +// The longest rejection reason is 114 chars and is generated in case of SCRIPT_ERR_EVAL_FALSE by // strprintf("block-script-verify-flag-failed (%s)", ScriptErrorString(check.GetScriptError())) -#define MAX_REJECT_REASON_LENGTH 118 +#define MAX_REJECT_REASON_LENGTH 114 // The longest string returned by RemovalReasonToString() is 'sizelimit' #define MAX_REMOVAL_REASON_LENGTH 9 #define HASH_LENGTH 32