File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -850,6 +850,17 @@ BOOST_AUTO_TEST_CASE(test_IsStandard)
850
850
t.vout [0 ].scriptPubKey = CScript () << OP_1;
851
851
CheckIsNotStandard (t, " scriptpubkey" );
852
852
853
+ // Test rejecttokens
854
+ t.vout [0 ].scriptPubKey = CScript () << OP_RETURN << OP_13 << OP_FALSE;
855
+ g_mempool_opts.reject_tokens = false ;
856
+ CheckIsStandard (t);
857
+ g_mempool_opts.reject_tokens = true ;
858
+ CheckIsNotStandard (t, " tokens-runes" );
859
+ // At least one data push is needed after OP_13 to match
860
+ t.vout [0 ].scriptPubKey = CScript () << OP_RETURN << OP_13;
861
+ CheckIsStandard (t);
862
+ g_mempool_opts.reject_tokens = false ;
863
+
853
864
// MAX_OP_RETURN_RELAY-byte TxoutType::NULL_DATA (standard)
854
865
t.vout [0 ].scriptPubKey = CScript () << OP_RETURN << ParseHex (" 04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef3804678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38" );
855
866
BOOST_CHECK_EQUAL (MAX_OP_RETURN_RELAY, t.vout [0 ].scriptPubKey .size ());
You can’t perform that action at this time.
0 commit comments