#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.
◆ 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); \
}