Skip to content

Commit 83eb124

Browse files
committed
test/transaction_tests: Add rejectparasites test to test_IsStandard
1 parent 4d021e6 commit 83eb124

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/test/transaction_tests.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -850,6 +850,17 @@ BOOST_AUTO_TEST_CASE(test_IsStandard)
850850
t.vout[0].scriptPubKey = CScript() << OP_1;
851851
CheckIsNotStandard(t, "scriptpubkey");
852852

853+
// Test rejectparasites
854+
t.vout[0].scriptPubKey = CScript() << OP_RETURN;
855+
t.nLockTime = 21;
856+
g_mempool_opts.reject_parasites = false;
857+
CheckIsStandard(t);
858+
g_mempool_opts.reject_parasites = true;
859+
CheckIsNotStandard(t, "parasite-cat21");
860+
t.nLockTime = 0;
861+
CheckIsStandard(t);
862+
g_mempool_opts.reject_parasites = false;
863+
853864
// Test rejecttokens
854865
t.vout[0].scriptPubKey = CScript() << OP_RETURN << OP_13 << OP_FALSE;
855866
g_mempool_opts.reject_tokens = false;

0 commit comments

Comments
 (0)