contracts/arisen.system/src/com.cpp
/**
    * @brief Checks if CPU and Network loans are available
    *
    * Loans are available if 1) COM pool lendable balance is nonempty, and 2) there are no
    * unfilled sellcom orders.
    */
@brief Checks if CPU and Network loans are available
Loans are available if 1) COM pool lendable balance is nonempty, and 2) there are no
unfilled sellcom orders.
@brief Checks if CPU and Network loans are available Loans are available if 1 ) COM pool lendable balance is nonempty and 2 ) there are no unfilled sellcom orders .
bool system_contract::com_loans_available()const
   {
      if ( !com_available() ) {
         return false;
      } else {
         if ( _comorders.begin() == _comorders.end() ) {
            return true; 
         } else {
            auto idx = _comorders.get_index<"bytime"_n>();
            return !idx.begin()->is_open; 
         }
      }
   }
bool system_contract :: com_loans_available ( ) const { if ( ! com_available ( ) ) { return false ; } else { if ( _comorders . begin ( ) == _comorders . end ( ) ) { return true ; } else { auto idx = _comorders . get_index < " " _n > ( ) ; return ! idx . begin ( ) -> is_open ; } } }
@brief Checks if CPU and Network loans are available
 Loans are available if 1) COM pool lendable balance is nonempty, and 2) there are no
 unfilled sellcom orders.
@brief Checks if CPU and Network loans are available Loans are available if 1 ) COM pool lendable balance is nonempty and 2 ) there are no unfilled sellcom orders .
// no outstanding sellcom orders // no outstanding unfilled sellcom orders