mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-12 19:20:42 +02:00
test_IsStandard: Work with any MAX_OP_RETURN_RELAY
This commit is contained in:
parent
0551bcd0ff
commit
1b37b2d605
@ -873,12 +873,15 @@ BOOST_AUTO_TEST_CASE(test_IsStandard)
|
||||
g_mempool_opts.reject_tokens = false;
|
||||
|
||||
// MAX_OP_RETURN_RELAY-byte TxoutType::NULL_DATA (standard)
|
||||
t.vout[0].scriptPubKey = CScript() << OP_RETURN << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef3804678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38");
|
||||
t.vout[0].scriptPubKey = CScript() << OP_RETURN;
|
||||
while (t.vout[0].scriptPubKey.size() < MAX_OP_RETURN_RELAY) {
|
||||
t.vout[0].scriptPubKey << OP_0;
|
||||
}
|
||||
BOOST_CHECK_EQUAL(MAX_OP_RETURN_RELAY, t.vout[0].scriptPubKey.size());
|
||||
CheckIsStandard(t);
|
||||
|
||||
// MAX_OP_RETURN_RELAY+1-byte TxoutType::NULL_DATA (non-standard)
|
||||
t.vout[0].scriptPubKey = CScript() << OP_RETURN << ParseHex("04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef3804678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef3800");
|
||||
t.vout[0].scriptPubKey << OP_0;
|
||||
BOOST_CHECK_EQUAL(MAX_OP_RETURN_RELAY + 1, t.vout[0].scriptPubKey.size());
|
||||
CheckIsNotStandard(t, "scriptpubkey");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user