예제 #1
0
        public static EXECUTION_RESULT?DUP(ref ExecutionStack stack)
        {
            if (!stack.Any())
            {
                return(EXECUTION_RESULT.INVALID_STACK);
            }
            var item = stack.Pop();

            stack.Push(item, item);
            return(null);
        }
예제 #2
0
 public static EXECUTION_RESULT?VERIFY(ref ExecutionStack stack)
 {
     if (!stack.Any())
     {
         return(EXECUTION_RESULT.INVALID_STACK);
     }
     else if (!stack.PopBool())
     {
         return(EXECUTION_RESULT.FAILURE);
     }
     else
     {
         return(null);
     }
 }