File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -713,6 +713,29 @@ BOOST_AUTO_TEST_CASE(test_IsStandard)
713
713
t.vout [0 ].nValue = nDustThreshold;
714
714
BOOST_CHECK (IsStandardTx (CTransaction (t), reason));
715
715
716
+ // Disallowed nVersion
717
+ t.nVersion = -1 ;
718
+ reason.clear ();
719
+ BOOST_CHECK (!IsStandardTx (CTransaction (t), reason));
720
+ BOOST_CHECK_EQUAL (reason, " version" );
721
+
722
+ t.nVersion = 0 ;
723
+ reason.clear ();
724
+ BOOST_CHECK (!IsStandardTx (CTransaction (t), reason));
725
+ BOOST_CHECK_EQUAL (reason, " version" );
726
+
727
+ t.nVersion = 3 ;
728
+ reason.clear ();
729
+ BOOST_CHECK (!IsStandardTx (CTransaction (t), reason));
730
+ BOOST_CHECK_EQUAL (reason, " version" );
731
+
732
+ // Allowed nVersion
733
+ t.nVersion = 1 ;
734
+ BOOST_CHECK (IsStandardTx (CTransaction (t), reason));
735
+
736
+ t.nVersion = 2 ;
737
+ BOOST_CHECK (IsStandardTx (CTransaction (t), reason));
738
+
716
739
// Check dust with odd relay fee to verify rounding:
717
740
// nDustThreshold = 182 * 3702 / 1000
718
741
dustRelayFee = CFeeRate (3702 );
You can’t perform that action at this time.
0 commit comments