From b420376aef7e6fbc8fe35dd909b6bac085c7b0c7 Mon Sep 17 00:00:00 2001 From: Peter Todd Date: Mon, 28 Apr 2025 20:15:08 +0000 Subject: [PATCH] Add comment to test noting when OP_RETURN limit was removed --- src/test/transaction_tests.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp index c5707bca72f..988adbded9c 100644 --- a/src/test/transaction_tests.cpp +++ b/src/test/transaction_tests.cpp @@ -859,6 +859,9 @@ BOOST_AUTO_TEST_CASE(test_IsStandard) CheckIsNotStandard(t, "scriptpubkey"); // TxoutType::NULL_DATA + // + // Until v30 OP_RETURN was limited to 83 bytes (80 bytes of data, +1 for + // OP_RETURN, +2 for the pushdata opcodes). Here we test with 84 bytes. t.vout[0].scriptPubKey = CScript() << OP_RETURN << "04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef3804678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef3800"_hex; BOOST_CHECK_EQUAL(84, t.vout[0].scriptPubKey.size()); CheckIsStandard(t);