contracts/arisen.system/src/com.cpp
/**
    * @brief Reads amount of COM in savings bucket and removes the bucket from maturities
    *
    * Reads and (temporarily) removes COM savings bucket from COM maturities in order to
    * allow uniform processing of remaining buckets as savings is a special case. This
    * function is used in conjunction with put_com_savings.
    *
    * @param bitr - iterator pointing to com_balance object
    *
    * @return int64_t - amount of COM in savings bucket
    */
@brief Reads amount of COM in savings bucket and removes the bucket from maturities
Reads and (temporarily) removes COM savings bucket from COM maturities in order to
allow uniform processing of remaining buckets as savings is a special case. This
function is used in conjunction with put_com_savings.

@param bitr - iterator pointing to com_balance object

@return int64_t - amount of COM in savings bucket
@brief Reads amount of COM in savings bucket and removes the bucket from maturities Reads and ( temporarily ) removes COM savings bucket from COM maturities in order to allow uniform processing of remaining buckets as savings is a special case . This function is used in conjunction with put_com_savings . @param bitr - iterator pointing to com_balance object @return int64_t - amount of COM in savings bucket
int64_t system_contract::read_com_savings( const com_balance_table::const_iterator& bitr )
   {
      int64_t com_in_savings = 0;
      static const time_point_sec end_of_days = time_point_sec::maximum();
      if ( !bitr->com_maturities.empty() && bitr->com_maturities.back().first == end_of_days ) {
         _combalance.modify( bitr, same_payer, [&]( auto& rb ) {
            com_in_savings = rb.com_maturities.back().second;
            rb.com_maturities.pop_back();
         });
      }
      return com_in_savings;
   }
int64_t system_contract :: read_com_savings ( const com_balance_table :: const_iterator & bitr ) { int64_t com_in_savings = 0 ; static const time_point_sec end_of_days = time_point_sec :: maximum ( ) ; if ( ! bitr -> com_maturities . empty ( ) && bitr -> com_maturities . back ( ) . first == end_of_days ) { _combalance . modify ( bitr , same_payer , [ & ] ( auto & rb ) { com_in_savings = rb . com_maturities . back ( ) . second ; rb . com_maturities . pop_back ( ) ; } ) ; } return com_in_savings ; }
@brief Reads amount of COM in savings bucket and removes the bucket from maturities
 Reads and (temporarily) removes COM savings bucket from COM maturities in order to
 allow uniform processing of remaining buckets as savings is a special case.
@brief Reads amount of COM in savings bucket and removes the bucket from maturities Reads and ( temporarily ) removes COM savings bucket from COM maturities in order to allow uniform processing of remaining buckets as savings is a special case .