BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet software
Namespaces | Macros
asset_object.cpp File Reference
#include <graphene/chain/asset_object.hpp>
#include <graphene/chain/database.hpp>
#include <graphene/chain/hardfork.hpp>
#include <fc/io/raw.hpp>
#include <fc/uint128.hpp>

Go to the source code of this file.

Namespaces

 graphene
 
 graphene::chain
 

Macros

#define CALCULATE_MEDIAN_VALUE(r, data, field_name)
 
#define CHECK_AND_CALCULATE_MEDIAN_VALUE(r, data, field_name)
 

Macro Definition Documentation

◆ CALCULATE_MEDIAN_VALUE

#define CALCULATE_MEDIAN_VALUE (   r,
  data,
  field_name 
)
Value:
std::nth_element( effective_feeds.begin(), median_itr, effective_feeds.end(), \
[](const price_feed_with_icr& a, const price_feed_with_icr& b) { \
return a.field_name < b.field_name; \
}); \
tmp_median_feed.field_name = median_itr->get().field_name;

◆ CHECK_AND_CALCULATE_MEDIAN_VALUE

#define CHECK_AND_CALCULATE_MEDIAN_VALUE (   r,
  data,
  field_name 
)
Value:
if( options.extensions.value.field_name.valid() ) { \
tmp_median_feed.field_name = *options.extensions.value.field_name; \
} else { \
CALCULATE_MEDIAN_VALUE(r, data, field_name); \
}