Merge branch '480-fork-mia-core-exchange' into develop

This commit is contained in:
theoreticalbts 2016-01-07 11:30:04 -05:00
commit 84fab61589
3 changed files with 15 additions and 1 deletions

View file

@ -491,6 +491,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 )

View file

@ -36,3 +36,4 @@
// #453 Hardfork to retroactively correct referral percentages
#define HARDFORK_453_TIME (fc::time_point_sec( 1450288800 ))
#define HARDFORK_480_TIME (fc::time_point_sec( 1450378800 ))

View file

@ -136,7 +136,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() );