Changeset View
Changeset View
Standalone View
Standalone View
src/test/transaction_tests.cpp
Show First 20 Lines • Show All 581 Lines • ▼ Show 20 Lines | t.vout[0].scriptPubKey = | ||||
"271967f1a67130b7105cd6a828e03909a67962e0ea1f61de" | "271967f1a67130b7105cd6a828e03909a67962e0ea1f61de" | ||||
"b649f6bc3f4cef3800"); | "b649f6bc3f4cef3800"); | ||||
BOOST_CHECK_EQUAL(MAX_OP_RETURN_RELAY + 1, t.vout[0].scriptPubKey.size()); | BOOST_CHECK_EQUAL(MAX_OP_RETURN_RELAY + 1, t.vout[0].scriptPubKey.size()); | ||||
BOOST_CHECK(!IsStandardTx(t, reason)); | BOOST_CHECK(!IsStandardTx(t, reason)); | ||||
// Data payload can be encoded in any way... | // Data payload can be encoded in any way... | ||||
t.vout[0].scriptPubKey = CScript() << OP_RETURN << ParseHex(""); | t.vout[0].scriptPubKey = CScript() << OP_RETURN << ParseHex(""); | ||||
BOOST_CHECK(IsStandardTx(t, reason)); | BOOST_CHECK(IsStandardTx(t, reason)); | ||||
t.vout[0].scriptPubKey = CScript() << OP_RETURN << ParseHex("00") | t.vout[0].scriptPubKey = CScript() | ||||
<< ParseHex("01"); | << OP_RETURN << ParseHex("00") << ParseHex("01"); | ||||
BOOST_CHECK(IsStandardTx(t, reason)); | BOOST_CHECK(IsStandardTx(t, reason)); | ||||
// OP_RESERVED *is* considered to be a PUSHDATA type opcode by IsPushOnly()! | // OP_RESERVED *is* considered to be a PUSHDATA type opcode by IsPushOnly()! | ||||
t.vout[0].scriptPubKey = CScript() << OP_RETURN << OP_RESERVED << -1 << 0 | t.vout[0].scriptPubKey = CScript() << OP_RETURN << OP_RESERVED << -1 << 0 | ||||
<< ParseHex("01") << 2 << 3 << 4 << 5 | << ParseHex("01") << 2 << 3 << 4 << 5 | ||||
<< 6 << 7 << 8 << 9 << 10 << 11 << 12 | << 6 << 7 << 8 << 9 << 10 << 11 << 12 | ||||
<< 13 << 14 << 15 << 16; | << 13 << 14 << 15 << 16; | ||||
BOOST_CHECK(IsStandardTx(t, reason)); | BOOST_CHECK(IsStandardTx(t, reason)); | ||||
t.vout[0].scriptPubKey = CScript() | t.vout[0].scriptPubKey = CScript() | ||||
Show All 39 Lines |