Skip to content

Commit fcf646c

Browse files
committed
Merge pull request #5286
44e9a6b Update the 'test_IsStandard' unit test (Flavien Charlon) a930658 Change the default maximum OP_RETURN size to 80 bytes (Flavien Charlon)
2 parents e5f1f5a + 44e9a6b commit fcf646c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/script/standard.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class CScriptID : public uint160
2525
CScriptID(const uint160& in) : uint160(in) {}
2626
};
2727

28-
static const unsigned int MAX_OP_RETURN_RELAY = 40; //! bytes
28+
static const unsigned int MAX_OP_RETURN_RELAY = 80; //! bytes
2929
extern unsigned nMaxDatacarrierBytes;
3030

3131
/**

src/test/transaction_tests.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,12 +347,12 @@ BOOST_AUTO_TEST_CASE(test_IsStandard)
347347
t.vout[0].scriptPubKey = CScript() << OP_1;
348348
BOOST_CHECK(!IsStandardTx(t, reason));
349349

350-
// 40-byte TX_NULL_DATA (standard)
351-
t.vout[0].scriptPubKey = CScript() << OP_RETURN << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38");
350+
// 80-byte TX_NULL_DATA (standard)
351+
t.vout[0].scriptPubKey = CScript() << OP_RETURN << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef3804678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38");
352352
BOOST_CHECK(IsStandardTx(t, reason));
353353

354-
// 41-byte TX_NULL_DATA (non-standard)
355-
t.vout[0].scriptPubKey = CScript() << OP_RETURN << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef3800");
354+
// 81-byte TX_NULL_DATA (non-standard)
355+
t.vout[0].scriptPubKey = CScript() << OP_RETURN << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef3804678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef3800");
356356
BOOST_CHECK(!IsStandardTx(t, reason));
357357

358358
// TX_NULL_DATA w/o PUSHDATA

0 commit comments

Comments
 (0)