File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -784,6 +784,19 @@ BOOST_AUTO_TEST_CASE(test_IsStandard)
784
784
reason.clear ();
785
785
BOOST_CHECK (!IsStandardTx (CTransaction (t), reason));
786
786
BOOST_CHECK_EQUAL (reason, " multi-op-return" );
787
+
788
+ // Check large scriptSig (non-standard if size is >1650 bytes)
789
+ t.vout .resize (1 );
790
+ t.vout [0 ].nValue = MAX_MONEY;
791
+ t.vout [0 ].scriptPubKey = GetScriptForDestination (PKHash (key.GetPubKey ()));
792
+ // OP_PUSHDATA2 with len (3 bytes) + data (1647 bytes) = 1650 bytes
793
+ t.vin [0 ].scriptSig = CScript () << std::vector<unsigned char >(1647 , 0 ); // 1650
794
+ BOOST_CHECK (IsStandardTx (CTransaction (t), reason));
795
+
796
+ t.vin [0 ].scriptSig = CScript () << std::vector<unsigned char >(1648 , 0 ); // 1651
797
+ reason.clear ();
798
+ BOOST_CHECK (!IsStandardTx (CTransaction (t), reason));
799
+ BOOST_CHECK_EQUAL (reason, " scriptsig-size" );
787
800
}
788
801
789
802
BOOST_AUTO_TEST_SUITE_END ()
You can’t perform that action at this time.
0 commit comments