Merge branch 'graphene/480-fork-mia-core-exchange' into bitshares
This commit is contained in:
commit
4d5515702c
3 changed files with 17 additions and 1 deletions
|
|
@ -502,6 +502,20 @@ void_result asset_publish_feeds_evaluator::do_evaluate(const asset_publish_feed_
|
|||
FC_ASSERT( !bitasset.has_settlement(), "No further feeds may be published after a settlement event" );
|
||||
|
||||
FC_ASSERT( o.feed.settlement_price.quote.asset_id == bitasset.options.short_backing_asset );
|
||||
if( d.head_block_time() > HARDFORK_480_TIME )
|
||||
{
|
||||
if( !o.feed.core_exchange_rate.is_null() )
|
||||
{
|
||||
FC_ASSERT( o.feed.core_exchange_rate.quote.asset_id == asset_id_type() );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( (!o.feed.settlement_price.is_null()) && (!o.feed.core_exchange_rate.is_null()) )
|
||||
{
|
||||
FC_ASSERT( o.feed.settlement_price.quote.asset_id == o.feed.core_exchange_rate.quote.asset_id );
|
||||
}
|
||||
}
|
||||
|
||||
//Verify that the publisher is authoritative to publish a feed
|
||||
if( base.options.flags & witness_fed_asset )
|
||||
|
|
|
|||
|
|
@ -38,3 +38,6 @@
|
|||
|
||||
// #453 Hardfork to retroactively correct referral percentages
|
||||
#define HARDFORK_453_TIME (fc::time_point_sec( 1450288800 ))
|
||||
|
||||
// #480 Fix non-CORE MIA core_exchange_rate check
|
||||
#define HARDFORK_480_TIME (fc::time_point_sec( 1450378800 ))
|
||||
|
|
|
|||
|
|
@ -139,7 +139,6 @@ void asset_publish_feed_operation::validate()const
|
|||
if( (!feed.settlement_price.is_null()) && (!feed.core_exchange_rate.is_null()) )
|
||||
{
|
||||
FC_ASSERT( feed.settlement_price.base.asset_id == feed.core_exchange_rate.base.asset_id );
|
||||
FC_ASSERT( feed.settlement_price.quote.asset_id == feed.core_exchange_rate.quote.asset_id );
|
||||
}
|
||||
|
||||
FC_ASSERT( !feed.settlement_price.is_null() );
|
||||
|
|
|
|||
Loading…
Reference in a new issue