@@ -788,6 +788,35 @@ Op.CALL, new DataWord(10000),
788788 VMConfig .initAllowTvmSelfdestructRestriction (0 );
789789 }
790790
791+ @ Test
792+ public void testCreate2MaxDepthWithOsakaOnly () throws ContractValidateException {
793+ boolean allowTvmCompatibleEvm = VMConfig .allowTvmCompatibleEvm ();
794+ boolean allowTvmOsaka = VMConfig .allowTvmOsaka ();
795+ VMConfig .initAllowTvmCompatibleEvm (0 );
796+ VMConfig .initAllowTvmOsaka (1 );
797+ try {
798+ invoke = new ProgramInvokeMockImpl () {
799+ @ Override
800+ public int getCallDeep () {
801+ return 64 ;
802+ }
803+ };
804+ Protocol .Transaction trx = Protocol .Transaction .getDefaultInstance ();
805+ InternalTransaction interTrx =
806+ new InternalTransaction (trx , InternalTransaction .TrxType .TRX_UNKNOWN_TYPE );
807+ program = new Program (new byte [0 ], new byte [0 ], invoke , interTrx );
808+ program .setRootTransactionId (new byte [32 ]);
809+
810+ program .createContract2 (DataWord .ZERO (), DataWord .ZERO (), DataWord .ZERO (), DataWord .ZERO ());
811+
812+ Assert .assertEquals (DataWord .ZERO (), program .getStack ().pop ());
813+ Assert .assertTrue (program .getResult ().getInternalTransactions ().isEmpty ());
814+ } finally {
815+ VMConfig .initAllowTvmCompatibleEvm (allowTvmCompatibleEvm ? 1 : 0 );
816+ VMConfig .initAllowTvmOsaka (allowTvmOsaka ? 1 : 0 );
817+ }
818+ }
819+
791820 // TIP-854 outer-frame containment: a CALL to validateMultiSign or
792821 // batchValidateSign with malformed calldata must (a) push 0 onto the outer
793822 // stack, (b) leave the outer frame free of any propagated exception, and
0 commit comments