Skip to content

Commit

Permalink
Merge pull request #1531 from bitshares/jmj_1018
Browse files Browse the repository at this point in the history
Added human-readable message to assert
  • Loading branch information
jmjatlanta committed Jan 14, 2019
2 parents aae2b4c + 28875e1 commit 596d7e9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions libraries/chain/market_evaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,13 @@ void_result limit_order_create_evaluator::do_evaluate(const limit_order_create_o
_receive_asset = &op.min_to_receive.asset_id(d);

if( _sell_asset->options.whitelist_markets.size() )
FC_ASSERT( _sell_asset->options.whitelist_markets.find(_receive_asset->id) != _sell_asset->options.whitelist_markets.end() );
FC_ASSERT( _sell_asset->options.whitelist_markets.find(_receive_asset->id)
!= _sell_asset->options.whitelist_markets.end(),
"This market has not been whitelisted." );
if( _sell_asset->options.blacklist_markets.size() )
FC_ASSERT( _sell_asset->options.blacklist_markets.find(_receive_asset->id) == _sell_asset->options.blacklist_markets.end() );
FC_ASSERT( _sell_asset->options.blacklist_markets.find(_receive_asset->id)
== _sell_asset->options.blacklist_markets.end(),
"This market has been blacklisted." );

FC_ASSERT( is_authorized_asset( d, *_seller, *_sell_asset ) );
FC_ASSERT( is_authorized_asset( d, *_seller, *_receive_asset ) );
Expand Down

0 comments on commit 596d7e9

Please sign in to comment.